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

Gold Member

## Summary:

Trying to uninstall Apache NetBeans 11.2 throws java.lang.NoClassDefFoundError.

## Main Question or Discussion Point

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:

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.)

jedishrfu and atyy

Related Computing and Technology News on Phys.org
jedishrfu
Mentor
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:
Gold Member
This is on windows right?
Yes.