8

I'm trying to install Apache Netbeans IDE on my Windows 10, then I encountered this problem "Critical Error- An unexpected exception happened in thread main. Exception: java.lang.NoClassDefFoundError: java/util/jarPack200"

Critical Error

After I click the Ok button another Error popped up

"Apache Netbeans IDE Installer- An error occurred while running java process Qt: Untested Windows Version 10.0 detected!"

Apache Netbeans Error

I also installed the latest JDK, and my Windows also updated before I tried to install Netbeans, I don't know what's causing the problem, if its the JDK or my Windows.

I tried searching on google for this problem but there's no result on how to fix this.

Apache Netbeans 11.3 Java SE Development Kit 14

Dids
  • 137
  • 2
  • 2
  • 18
  • 7
    From the Netbeans 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 https://openjdk.java.net/jeps/367" – Joachim Rohde Mar 25 '20 at 08:51
  • 4
    All of the current answers to this question are wrong because they do not explain the reason for the error, nor do they explain that NetBeans 11.3 can be used with JDK 14. The problem is that the _installer_ does not work with JDK 14 as noted in the comment from @JoachimRohde and [there are workarounds for that](https://stackoverflow.com/q/60922968/2985643). – skomisa Mar 31 '20 at 17:50
  • 3
    This issue has been formally raised as a bug report. See [NETBEANS-3985 NB installer cannot be launched in JDK-14](https://issues.apache.org/jira/browse/NETBEANS-3985). – skomisa Apr 02 '20 at 01:17
  • I had to install JDK 8 for the software to install. – EternalHour Apr 21 '20 at 23:30

8 Answers8

6

I was able to solve this same issue by installing JDK version 13 instead of version 14.

  • 5
    While this is a workaround for the problem, it is not necessarily a good solution since NetBeans 11.3 supports JDK 14, and the error reported in the OP lies with the installer rather than NetBeans itself. See [Couldn't install netbeans 11.3 with Java 14 due to Error: “Unsupported JVM version”](https://stackoverflow.com/q/60922968/2985643) for how to use JDK 14 with NetBeans 11.3. – skomisa Mar 30 '20 at 15:46
2

I have had the same problem and now that I have solved it, I would like to share it with you.

I'm not sure if this is your problem but in my case was that I was tried to install

Java JDK 14 and Apache NetBeans 11.3

And the problem was the Java Version of JDK, download the 11 JDK, and install.

And that's all, it works .

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • The problem was that the installer does not work with JDK 14 because the installer relies on an API that was removed in JDK14. That's the reason for the `NoClassDefFoundError`. The problem is with the installer, not JDK 14, and [there are workarounds for that](https://stackoverflow.com/q/60922968/2985643). – skomisa Mar 31 '20 at 17:44
1

My Solution: First replaced jdk-14 files by jdk-13. Installed Apache NB. Then restored files of jdk-14. NB installer does not support jdk-14 (but NB 11.3 itself supports jdk-14)

1

In my case, the error occurred because I had installed the JDK version 14. By installing version 11 the error was fixed.

Nikos Hidalgo
  • 3,666
  • 9
  • 25
  • 39
  • 1
    Welcome to stack overflow. This is the English version of the site so only questions and answers in English are allowed. Your answer was simple enough to translate, but keep that in mind for future responses. – Nikos Hidalgo Apr 21 '20 at 14:45
1

Instead of using the installer, you can download the zip file of the Netbeans found here! and then use it with JDK 14.

mytkavish
  • 97
  • 1
  • 6
1

Downloading JDK version 11 fixed this issue. It was also stated in the oracle site about JDK version 14 that they have an issue.

  • Same answer as already given by [Samuel Torres](https://stackoverflow.com/a/61345856/5698098) few months ago. Instead of adding a duplicated answer consider up-voting the existing answer, or provide an answer with more details. – Ivo Mori Jul 27 '20 at 05:47
1

Alternatively now you can download the ApacheNetbeans 12.0(LTS) from netbeans.apache.org which now permits installation with JDK 14(in previous versions it was not so due to some packages which were removed in JDK 14)

tachyon
  • 43
  • 1
  • 7
0

go on your panel control and see if you have a previous version of NetBeans. You should uninstall the previous version and install the new

  • I have previous NetBeans 8.0 but I already remove it, but still, it's showing in Add or Remove Programs List – Dids Mar 20 '20 at 08:28
  • 3
    You are giving very bad advice. It is not necessary to uninstall previous versions of NetBeans. In fact the opposite is true; multiple versions of NetBeans can safely co-exist, and can even be run concurrently with no problem. – skomisa Mar 21 '20 at 04:29