| Views: 4881
I've recently installed the JDK 8 on my rMBP and all of a sudden NetBeans stopped working for me. I've dug into this a little further and tried several things, none of which worked, in the end I ended up forcing NetBeans to use JDK 7 and everything was working again.
First NetBeans stopped launching from my Dock, so I opened up Terminal and tried to launch it manually, this presented me with the following error:
> open /Applications/NetBeans/NetBeans 7.1.2.app
LSOpenURLsWithRole() failed with error -10810 for the file /Applications/NetBeans/NetBeans 7.1.2.app.
Not much information here, so I tried to launch the NetBeans binary instead:
> /Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/bin/netbeans
Unrecognized VM option 'MaxPermSize=384m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Now I was getting somewhere.
The /Applications/NetBeans/NetBeans 7.1.2.app/Contents/MacOS/netbeans
script has the following setting:
I tried removing the MaxPermSize
setting, but it still failed with:
Unrecognized VM option 'PermSize=32m'
I dug in deeper and removed the PermSize
setting from /Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
Now the slash screen was showing up, yet NetBeans would still crash. The ~/.netbeans/7.1.2/var/log/messages.log
file had the following exception:
java.lang.IllegalStateException: java.lang.IllegalAccessException: Class org.openide.util.WeakListenerImpl$ProxyListener can not access a member of class org.openide.filesystems.$Proxy0 with modifiers "public"
This is do to with the Java security manager, everything I tried to disable it made NetBeans not start at all, the only workaround was to force JDK 7 to be used instead. I updated the /Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
file to have the following entry in my case:
Now NetBeans starts as expected.
Have comments or feedback on what I wrote? Please share them below! Found this useful? Consider sending me a small tip
Other posts you may like...