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 - NB stucks on startup after update to JDK 9
Summary: NB stucks on startup after update to JDK 9
Status: VERIFIED WONTFIX
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-18 15:41 UTC by mildegeister
Modified: 2017-10-19 11:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (919.95 KB, text/plain)
2017-10-18 15:41 UTC, mildegeister
Details

Note You need to log in before you can comment on or make changes to this bug.
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