JVM failed execution Mac OS 11.0.1

Viewed 1719

Intro


I´ve recently installed new Mac OS version (Big Sur) and found, as many other users, problems with JVM compatibility.

After looking through a lot of posts on SO and other web pages, I found several information regarding that it might be a problem concerning JAVA_HOME variable when trying to match JDK version. But unluckily, this is not my problem (I've carefully checked the path, and it is correct). For those that might want to double-check: my jdk version is adtopenjdk-8 and $JAVA_HOME variable content:

/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java 

The problem persist regardless the JDK version, I've tried with version 8, 11 and 15, all of them without any effect.


Problem approach

After a lot of research, I found in modifying config files in those programs (Netbeans, Eclipse Scala IDE and VirtualBox) in which JVM is used, a complete, a partial and an unexisting solution for each one.

  • First, Netbeans 8.2:

    I found the netbeans.conf file under the /Applications/NetBeans/NetBeans\ 8.2.app/Contents/Resources/NetBeans/etc/ directory. After uncommenting the line and adding the path to the jdk:

    netbeans_jdkhome="/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home"
    

    I manually indicated the path to the JVM that Netbeans should look for. This worked pretty well!

  • Second, Eclipse IDE for Scala:

    In this case indicating manually the jdk path through configuration file did not work entirely. First, the program did not even start and a error dialog appeared instead, which indicated that the JVM was not found. After googling, I found that editing the /Applications/eclipse.app/Contents/Info.plist file, could tell the Eclipse what JDK to use, rather than using the default one, and considering that this version (4.2) of Eclipse IDE for Scala only supports JDK-8, the resulting modified line was as it follows:

    <string>-vm</string><string>/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java</string>
    

    After the previous line was included the IDE run, but for my surprise, after seemly loading the editor and GUI, the following appeared:

    enter image description here

      For those who are familiar with this IDE, the run/debug icons are supposed to appear in the top       margin , but surprisingly they have disappeared! Reading the Eclipse error log file, I found the       following stack trace error:

!ENTRY org.eclipse.ui 4 0 2020-11-22 23:25:43.969
!MESSAGE Exceptions during shutdown
!STACK 0
java.lang.NullPointerException
 at org.eclipse.swt.widgets.Control.internal_new_GC(Control.java:2176)
 at org.eclipse.swt.graphics.GC.<init>(GC.java:174)
 at org.eclipse.swt.graphics.GC.<init>(GC.java:135)
 at org.eclipse.jface.dialogs.Dialog.shortenText(Dialog.java:357)
 at org.eclipse.jface.dialogs.ProgressMonitorDialog.setMessage(ProgressMonitorDialog.java:624)
 at org.eclipse.jface.dialogs.ProgressMonitorDialog.open(ProgressMonitorDialog.java:650)
 at org.eclipse.jface.dialogs.ProgressMonitorDialog.aboutToRun(ProgressMonitorDialog.java:555)
 at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:480)
 at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:237)
 at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.disconnectFromWorkspace(IDEWorkbenchAdvi...

      At this point, I must admit that I am completely lost. I have no clue of what to do.


  • Third (and my worst defeat), VirtualBox:

    In this case I have the same issue, whereas the application successfully executes, if I try to start a machine the following error dialog appears:

enter image description here enter image description here

1 Answers

scala IDE can be run on eclipse "continuous build 2020-06" and that doesn't seem to have the issues that oxygen has with the Big Sur OS update.

Note: don't attempt to use scala IDE with anything newer than "continuous build 2020-06" as its not compatible. As it is, using 2020-06 there are minor incompatibilities with the scala IDE that you won't see with running it on Oxygen (popup warnings with auto-complete and non functional line breakmarking). It's still very usable though.

Hopefully the guys at Typesafe will be able to put some time into porting the IDE to work with the latest eclipse.

Related