netbeans fails to start due to java9

Bug #1763091 reported by Nish Aravamudan
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
netbeans (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

$ netbeans
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/usr/share/netbeans/platform18/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Cursory googling around, implies this is java9 incompatibility; netbeans 9 is the first release to support java 9 (it's unclear if 8.2 does). The simplest fix is to rebuild with just java 8 support and use java 8 at runtime.

Nish Aravamudan (nacc)
Changed in netbeans (Ubuntu):
status: New → In Progress
assignee: nobody → Nish Aravamudan (nacc)
Revision history for this message
Managor (managor) wrote :

I'm having the same problem with a fresh Xubuntu 18.04 install

Revision history for this message
pr.nizar (pr-nizar-deactivatedaccount) wrote :

I'm having the same problem with a fresh Ubuntu 18.04 install.
I installed netbeans through the command:

sudo apt install netbeans

I had the same error:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/usr/share/netbeans/platform18/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

The netbeans package (https://packages.ubuntu.com/fr/bionic/netbeans) states that it has default-jdk as dependency which installs openjdk-11-jdk by default but the current netbeans version uses Java 8.

I installed openjdk-8-jdk manually by:

sudo apt-get install openjdk-8-jdk

Then I used Java 8 as default Java version to use:

sudo update-alternatives --config java
sudo update-alternatives --config javac

Now I don't have error messages but netbeans fails to start anyway.

I attach to this the content of ~/.netbeans/8.1/var/log/messages.log

As it seems Netbeans now fails because of the version of libequinox-osgi-java (https://bugs.debian.org/891957).

Revision history for this message
Alejandro Arcos (aarcos) wrote :

I have the same problem, with the IDE. If urgent for my case, download jdk-8u171-nb-8_2-linux-x64.sh from netbeans.org.

Before install run autoremove openjdk-8-"all" and netbeans if is installed.

And then install jdk-8u171-nb-8_2-linux-x64.sh this package contains jdk 8

Best

Alejandro

Revision history for this message
ais523 (ais523) wrote :

I believe that there are two separate bugs here.

One is the deprecated reflective access. However, that isn't what's preventing NetBeans from loading; it's only a warning after all.

I think the failure to load is a different bug. That's being discussed in #1760907.

Revision history for this message
ais523 (ais523) wrote :

(By the way, should this bug be marked as a duplicate of #1760907? I assume most people who are subscribed to this care more about the crash than the use of a deprecated feature that still works. The crash has nothing to do with Java 9, though; it can be reproduced even running NetBeans under Java 8.)

Revision history for this message
aaronfranke (arnfranke) wrote :

NetBeans needs to be updated to version 10. This problem is entirely caused by Ubuntu having an old version of NetBeans.

Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, according to this report, you are not using the most recent version of this package for your Ubuntu release. Please upgrade to the most recent version and let us know if you are still having this issue. Thanks in advance.

Changed in netbeans (Ubuntu):
status: In Progress → Incomplete
assignee: Nish Aravamudan (nacc) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.