Error occurred during initialization of VM java/lang/ClassNotFoundException: error in opening JAR file /usr/local/java/jre/lib/rt.jar
Just a little Google fodder. Should you encounter this uncommon error message when trying to compile or run a Java program:
$ javac -version Error occurred during initialization of VM java/lang/ClassNotFoundException: error in opening JAR file /usr/local/java/jre/lib/rt.jar
it means that your installation of the JDK, and likely your original download is corrupt. Delete it, download again, and reinstall. This can occur with essentially any Java program: the interpreter, the compiler, jar, or a program merely written in Java such as LimeWire.
For reasons that aren’t especially clear, this bug seems to occur most frequently on Ubuntu Linux 7.10 Gutsy Gibbon when running in a virtualized environment such as VMWare. At least those seem to be the common factors for everyone else I found with this problem when googling it myself.
February 10th, 2008 at 12:38 PM
You are absolutely right.. am using a virtual operating system(User mode Linux). am getting the error
error occurred during initialization of VM java/lang/classNotFoundException:.. i donno how to rectify this error.. i have tried many source files to install java.. pls help me
June 18th, 2008 at 7:06 PM
I’ve had this problem myself on a single system running RHEL-4.
I tried installing the RPM version of 1.6.0 update 6 AND the RPM version of 1.6.0 update 5, both gave the error above.
The system had been running the RPM for 1.5.x and was working.
I beat on it trying all sorts of things, removing and reinstalling the packages, downloading them again, and reinstalling, all to no avail.
The final solution was to download the .tar.gz version and install that instead.
I do not know why this worked while the RPM version failed.
July 28th, 2010 at 4:12 AM
Thanks … for this
June 19th, 2013 at 3:25 PM
i reinstalled the JDK but the error still isnt solved