Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix error while installing NetBeans?

Tags:

java

netbeans

I have installed Java and am trying to install NetBeans 11.3 on my Windows 10 but after I ran the exe. installer, an error message popped up:

An unexpected exception happened in thread main java.lang.NoClassDefFoundError java/util/jar/Pack200

like image 736
Clairexxp Avatar asked Mar 20 '20 08:03

Clairexxp


People also ask

How do I fix build error in NetBeans?

Solution to my problem: Remove MinGW and ALL of it's components, and also remove the folder x:\MinGW. Then install Cygwin, choose the packages you need, tutorial can be found on https://netbeans.org/community/releases/73/cpp-setup-instructions.html#cygwin or YouTube about which packages you need.

Does NetBeans work with JDK 15?

JDK 15 was released after NetBeans 12.1 so it is not officially supported.


2 Answers

NetBeans have problems with the jdk-14, because I suppose that you have install the jdk-14 so uninstall it and try it with the jdk-13.0.2.

like image 64
José Ramón Mendoza Ortiz Avatar answered Sep 19 '22 05:09

José Ramón Mendoza Ortiz


Sorry, but in my opinion is to install an old version from Java no solution, just because it works. When someone has problems with his Firewall, simply disable the Firewall would also be no solution.

https://www.java.com/en/download/faq/other_jreversions.xml
We highly recommend users remove all older versions of Java from your system. Keeping old and unsupported versions of Java on your system presents a serious security risk. Removing older versions of Java from your system ensures that Java applications will run with the most up-to-date security and performance improvements on your system.

The "real" solution would be a reprogramming of the NetBeans installer. This used function was suggested for deprecated on 2018-04-04, which was done on 2018-08-23.
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8200752
The removal was suggested on 2019-10-08, which was done on 2019-12-18.
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8232022

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8232022
We assume that developers who rely on Pack200 have had enough notice about its proposed removal to make alternative arrangements. … We assume that developers who use pack200 to shrink application JARs can switch to either the jlink tool or the jpackage tool to create application-specific runtimes with an optimized form factor.

edit: I solved it this way.

  1. uninstalled JDK 14
  2. installed JDK 13.0.2
  3. installed Apache NetBeans
  4. installed JDK 14
  5. open C:\Program Files\NetBeans\netbeans\etc\netbeans.conf and changed path to JDK
  6. uninstalled JDK 13.0.2

Now NetBeans runs with the JDK 14.

like image 30
Felistrix Avatar answered Sep 21 '22 05:09

Felistrix