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 271667

Summary: NB stucks on startup after update to JDK 9
Product: ide Reporter: mildegeister
Component: CodeAssignee: issues@ide <issues>
Status: VERIFIED WONTFIX    
Severity: normal CC: mildegeister
Priority: P3    
Version: 8.2   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description mildegeister 2017-10-18 15:41:51 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Mac OS X version 10.12.6 running on x86_64
Java; VM; Vendor = 9.0.1
Runtime = Java HotSpot(TM) 64-Bit Server VM 9.0.1+11

Reproducibility: Happens every time

STEPS:
initial:
  * close NB where some open files are visible in tabs - individual implementations as well as JavaFX classes
  * install JDK9 (over JDK8)
reproduce:
  * restart NB

ACTUAL:
  * NB is starting with an pop up about missing target server (which maybe an old issue) and project background scanning starts but stops again very quick.
  * some of the tabs are recovered (e.g. TableView.java and some of my own implementations), others are not (e.g. TableViewSkin + TableViewSkinBase and some others of my own implementations)
  * "TableViewSkin - Navigator" is written on left hand side (Project Browser?), but entire area is grey with "<No View Available>"
  * From Tools menu no entries are accessible, except "NetBeans Plattforms", so I cannot even manually redirect to the new Java Platform
  * on lower right/footer there is one red Icon with "You have 1 unread notification" on mouse over, its about this Unexpected Exception, but it cannot be opened/read. On double click an empty Notification window is opened.

EXPECTED:
  all projects explorer is visible, old state of expanded notes is restored
  all file tabs are restored
  Tools menu is fully accessible
Comment 1 mildegeister 2017-10-18 15:41:57 UTC
Created attachment 165310 [details]
IDE log
Comment 2 Jiri Kovalsky 2017-10-18 21:06:49 UTC
NetBeans 8.2 does not work with JDK 9. For more information, please see https://jaxenter.com/netbeans/using-apache-netbeans-incubating-jdk-9
Comment 3 mildegeister 2017-10-19 11:18:03 UTC
Quick solution:

Temporary shell based script:
- on the console check which versions exist on your machine:
JAVA_HOME -V
- put this line in starting script of NetBeans:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
(assuming that any major version 1.8 exist)

Permanent change to the OS:
- go to: /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents
- rename Info.plist --> Info.plist.disabled
- restart NetBeans, it will pick the next highest (valid) JDK available

source:
https://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x