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

  • Thread starter Thread starter Wrichik Basu
  • Start date Start date
AI Thread Summary
Uninstalling Apache NetBeans 11.2 can trigger a java.lang.NoClassDefFoundError if JDK 14 is installed, as the uninstaller requires JDK 11. To resolve this, users should install JDK 11, adjust the JAVA_HOME variable, and close any dependent applications before attempting the uninstallation. After rebooting, the uninstallation should proceed without errors, and users can revert the JAVA_HOME variable back to JDK 14 afterward. While some users have found success with JDK 13, the issue primarily affects Windows users, as other platforms typically allow for simple directory deletions. NetBeans is praised for its comprehensive features, though users noted some shortcomings in code printing, diff coloring, and Markdown support.
Wrichik Basu
Science Advisor
Insights Author
Gold Member
Messages
2,180
Reaction score
2,717
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
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.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top