[FIX] Uninstalling NetBeans 11.2 throws java.lang.NoClassDefFoundError

  • Context: Java 
  • Thread starter Thread starter Wrichik Basu
  • Start date Start date
Click For Summary
SUMMARY

The issue of uninstalling Apache NetBeans 11.2 on Windows 10 x64 results in a java.lang.NoClassDefFoundError when using JDK 14. The solution involves installing JDK 11, adjusting the JAVA_HOME environment variable, and ensuring all dependent applications are closed before proceeding with the uninstallation. After rebooting, the uninstallation of NetBeans 11.2 can be completed without errors. Users have also noted that JDK 13 may serve as an alternative to JDK 11 for resolving this issue.

PREREQUISITES
  • Understanding of JDK versions, specifically JDK 11 and JDK 14
  • Familiarity with Windows environment variables and how to modify them
  • Basic knowledge of Apache NetBeans installation and uninstallation processes
  • Experience with troubleshooting Java-related errors on Windows systems
NEXT STEPS
  • Research how to manage Java environment variables on Windows
  • Learn about the differences between JDK 11, JDK 13, and JDK 14
  • Explore the features and benefits of Apache NetBeans 12.0
  • Investigate alternative IDEs like IntelliJ IDE Community Edition for Java development
USEFUL FOR

Java developers, software engineers, and anyone involved in managing Java development environments, particularly those using Apache NetBeans.

Wrichik Basu
Science Advisor
Insights Author
Gold Member
Messages
2,188
Reaction score
2,694
TL;DR
Trying to uninstall Apache NetBeans 11.2 throws java.lang.NoClassDefFoundError.
Problem:

Apache NetBeans (NB) 12.0 has been released recently, so I decided to uninstall v11.2 after installing v12.0. When I tried to uninstall it from Control Panel, I got an error:

1594495274990.png

My laptop runs Win 10 x64.

Solution:

Most of the documentation on the net is on NB 8.2, at least as of now. I found it difficult to find a solution.

The problem arises if you are using JDK 14 with NB 11.2. Apparently, the uninstaller needs JDK 11.

So, download JDK 11, install it, and then change the path and/or JAVA_HOME variable(s) in the environment variables. Note that some applications that depend on JDK might malfunction with this change, so close all such applications (like Android Studio and NB itself), and then do the installation.

Once the installation is complete, restart your machine.

After reboot, try to uninstall NB 11.2. Now it should proceed without any error. Once the uninstallation finishes, you can revert the path and/or JAVA_HOME variable(s) to point to JDK 14.

P.S.: Some have said that installing JDK 13 instead of JDK 11 also does the trick. This error might crop up even during the installation of NB 11.2 or 11.3. When I had installed NB 11.2, I had JDK 11 installed, and maybe that's why I didn't see an error. As of now, NB 12.0 installs properly with JDK 14, but that doesn't mean it won't throw an error if you are using higher JDK during its uninstallation. Note that you don't have to uninstall JDK 14 when you install JDK 11, but be sure to change the path variable. (I was going to post this thread asking for the solution, but soon after writing the problem, I found the solution and it worked. So I decided to post the solution here, hoping that it will help someone in the future.)
 
  • Like
Likes   Reactions: jedishrfu and atyy
Technology news on Phys.org
This is on windows right?

on other platforms we tend to just delete directories to remove it.

I used to be an Eclipse user but after working in a new group switched to Netbeans. One nice thing about Netbeans is that it’s a very complete product when installed. Source code management and build tools are available and work with other tools available for download.

With eclipse, we had to hunt around for some tools only to discover that they are no longer free or the free version has stopped being updated while the paid one is.

Netbeans has Matisse for forms design which makes doing professional java GUI programming so much easier. It’s code debugger is excellent.

My three complaints are:
- code printing doesn’t work well
- diff code coloring is absolutely terrible and hurts your eyes
- missing Markdown support

The nearest competitor to Netbeans is IntelliJ IDE Community Edition which has an excellent diff code coloring tool.
 
Last edited:
jedishrfu said:
This is on windows right?
Yes.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
1K
Replies
29
Views
6K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 11 ·
Replies
11
Views
33K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 125 ·
5
Replies
125
Views
20K
  • · Replies 1 ·
Replies
1
Views
2K