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

  • Java
  • Thread starter Wrichik Basu
  • Start date
In summary, some users have reported difficulties uninstalling Apache NetBeans 11.2 on Windows 10 x64. This issue is caused by using JDK 14 with NB 11.2, as the uninstaller requires JDK 11. To solve this, one must download and install JDK 11, change the path and/or JAVA_HOME variables in the environment variables, restart the machine, and then uninstall NB 11.2. Some have also reported success with using JDK 13 instead of 11. NetBeans 12.0 can be installed with JDK 14, but uninstallation may still require JDK 11. NetBeans offers a complete product with source code management and build tools, as well as a user-friendly GUI design
  • #1
Wrichik Basu
Science Advisor
Insights Author
Gold Member
2,136
2,712
TL;DR Summary
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 jedishrfu and atyy
Technology news on Phys.org
  • #2
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:
  • #3
jedishrfu said:
This is on windows right?
Yes.
 

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

1. What does the error "java.lang.NoClassDefFoundError" mean when uninstalling NetBeans 11.2?

This error indicates that there is a missing class or file that is necessary for the uninstallation process to be completed successfully.

2. How can I fix the "java.lang.NoClassDefFoundError" error when attempting to uninstall NetBeans 11.2?

You can fix this error by ensuring that all necessary files and classes are present and properly configured for the uninstallation process. You may also need to check for any conflicting software or dependencies that could be causing the error.

3. Can this error occur during the installation of NetBeans 11.2?

Yes, this error can occur during both the installation and uninstallation processes of NetBeans 11.2. It is typically caused by missing or conflicting files and classes.

4. How can I prevent the "java.lang.NoClassDefFoundError" error from occurring in the future?

To prevent this error, make sure to thoroughly check for any missing or conflicting files and classes before installing or uninstalling NetBeans 11.2. It may also be helpful to regularly update your software and dependencies to ensure compatibility.

5. Are there any alternative methods for uninstalling NetBeans 11.2?

Yes, there are alternative methods for uninstalling NetBeans 11.2, such as using a third-party uninstaller program or manually deleting all related files and folders. However, it is important to note that these methods may not guarantee a complete and error-free uninstallation.

Similar threads

Replies
1
Views
1K
Replies
2
Views
5K
Replies
11
Views
31K
Replies
5
Views
2K
Replies
4
Views
3K
Replies
125
Views
17K
Replies
2
Views
3K
Back
Top