This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 271523 - After installing Java 9 SDK on my mac netbeans fails to start correctly
Summary: After installing Java 9 SDK on my mac netbeans fails to start correctly
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Platform (show other bugs)
Version: 8.2
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-25 17:48 UTC by la3lma
Modified: 2017-12-15 08:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sceenshot of IDE after starting. Usually this will show a list of open projects. (58.54 KB, image/jpeg)
2017-09-25 17:48 UTC, la3lma
Details

Note You need to log in before you can comment on or make changes to this bug.
Description la3lma 2017-09-25 17:48:01 UTC
Created attachment 165176 [details]
Sceenshot of IDE after starting. Usually this will show a list of open projects.

Netbeans 8.2 won't start after I install jdk 9 on my OSX machine, and works again after I uninstall it.



When looking at the IDE log, I see this config:

Diagnostic information
Input arguments:
	-Djdk.home=/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
	-Dnetbeans.default_userdir_root=/Users/rmz/Library/Application Support/NetBeans
	-Dnetbeans.dirs=/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/nb:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/ergonomics:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/ide:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/java:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/apisupport:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/webcommon:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/websvccommon:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/enterprise:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/mobility:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/profiler:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/python:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/php:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/identity:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/harness:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/cnd:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/cndext:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/dlight:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/groovy:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extra:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/javacard:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/javafx:
	-Dnetbeans.home=/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform
	-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade
	-Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense
	-Xmx1024m
	-Xss2m
	-Xms32m
	-Dapple.laf.useScreenMenuBar=true
	-Dapple.awt.graphics.UseQuartz=true
	-Dsun.java2d.noddraw=true
	-Dsun.java2d.dpiaware=true
	-Dsun.zip.disableMemoryMapping=true
	-DaddExports:java.desktop/com.apple.eawt=ALL-UNNAMED
	-DaddExports:java.desktop/sun.awt=ALL-UNNAMED
	-DaddExports:java.base/jdk.internal.jrtfs=ALL-UNNAMED
	-DaddExports:java.desktop/apple.laf=ALL-UNNAMED
	-DaddExports:java.desktop/java.awt.peer=ALL-UNNAMED
	-DaddExports:java.desktop/com.sun.beans.editors=ALL-UNNAMED
	-DaddExports:java.desktop/sun.awt.im=ALL-UNNAMED
	-DaddExports:java.management/sun.management=ALL-UNNAMED
	-XX:+HeapDumpOnOutOfMemoryError
	-XX:HeapDumpPath=/Users/rmz/Library/Application Support/NetBeans/8.2/var/log/heapdump.hprof


It seems that the IDE assumes that the  standard JDK is 9, which it may in fact be since, 
   $/usr/libexec/java_home
   /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
However,  I can't for the life of me figure out how to keep the jdk 9 on my machine while still being able to run netbeans.  Deleting jdk 9 from my systems makes Netbeans 8.2 work like normal again.

I would like to run Netbeans 8.2 with jdk 9, but I can't see how to make that happen now.  Please help.
Comment 1 dtidgewell 2017-12-06 02:37:06 UTC
Did you figure out how to fix this?
Comment 2 la3lma 2017-12-15 08:54:28 UTC
I rewrote the startup script to explicitly use java 8 (setting some environment variable that I don't remember right now but was present in the script).

Couldn't find any other way to lock down the use of java 8.

(also, I started using intellj a lot more :-) )