Netbeans 8.0.1 not opening on MacOS Mojave

2020-08-04 04:22发布

问题:

After upgrade to Mojave, Netbeans 8.0.1 is not opening anymore ; it shows the splash screen, but closes right after.

It probably has to be with a JDK update; which JDK version it supports and how can i downgrade the JDK

Thanks !

回答1:

NetBeans reads a configuration file named netbeans.conf on startup. It is just a text file containing properties, located in its etc directory within the NetBeans installation. One of the properties it might specify is the path to the default JDK to be used via property netbeans_jdkhome.

If that path becomes invalid (e.g. possibly due to upgrading on Mac) then NetBeans won't start; as described in the OP it will display the splash screen then close down.

The solution is simply to edit property netbeans_jdkhome to specify a valid path to the JDK that you want to use.

Note that netbeans_jdkhome is not necessarily specified at all in netbeans.conf, since NetBeans has other ways of determining the default JDK path. But if netbeans_jdkhome is specified it is crucial that the path is valid.