- #1
- 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:
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
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
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
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:
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.)