Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't install netbeans 11.3 with Java 14 due to Error: "Unsupported JVM version"

I'm trying to install netbeans with Java 14.

I'm getting below error -

> sudo ./Apache-NetBeans-11.3-bin-linux-x64.sh --javahome /home/raj/.sdkman/candidates/java/current
Configuring the installer...
Searching for JVM on the system...
Unsupported JVM version at /home/raj/.sdkman/candidates/java/current.
Try to specify another JVM location using parameter --javahome

Below are my java details -

> which java
/home/raj/.sdkman/candidates/java/current/bin/java


> java --version
openjdk 14 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

My OS Details are -

> lsb_release -a
LSB Version:    core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: openSUSE
Description:    openSUSE Leap 15.1
Release:        15.1
Codename:       n/a

How can I fix this problem?

like image 956
Rajkumar Natarajan Avatar asked Mar 30 '20 01:03

Rajkumar Natarajan


People also ask

Is NetBeans compatible with JDK 14?

Apache NetBeans 11.3 runs on the JDK LTS releases 8 and 11, as well as on JDK 14.

Which version of NetBeans is compatible with JDK 11?

Apache NetBeans 11.1 runs on JDK LTS releases 8 and 11, as well as on JDK 12, i.e., the current JDK release at the time of this NetBeans release.

What JDK does NetBeans 12.5 support?

Deployment Platforms Apache NetBeans 12.5 runs on JDK LTS releases 8 and 11, with experimental support for JDK 17, i.e., the current JDK release at the time of this NetBeans release.

Which JDK is compatible with NetBeans?

NetBeans IDE supports JDK 8 features, such as lambda expressions, repeatable annotations, compact profiles, etc. When these constructs are used in your code, the IDE recognizes them, correctly highlights errors, and lets you automatically fix syntax.


1 Answers

Although Apache NetBeans 11.3 fully supports the use of JDK 14, unfortunately its installer does not. From the Apache NetBeans 11.3 download page:

The installers will not run under JDK 14 because usage is made of the Pack200 Tools and API, for packing and unpacking, which is removed in JDK 14, see JEP 367.

See JEP 367: Remove the Pack200 Tools and API for full details on why this change was made in JDK 14.

Your workarounds for this issue are:

  • Instead of using the installer, download and unzip the zip of Apache NetBeans 11.3 (named netbeans-11.3-bin.zip) from the download page. This approach worked for me.
  • Install a version of the JDK < 14, and you can then use the installer to install NetBeans 11.3 with that JDK. Once NetBeans 11.3 is installed you could edit netbeans.conf to make JDK 14 the default Java platform, or simply add it as a second Java platform using Tools > Java Platforms > Add Platform...
like image 156
skomisa Avatar answered Oct 02 '22 01:10

skomisa