Reputation: 1635
JRE version - jre1_6_16
JRE will throwing NoClassDefFoundError
while execute the java file .
Error Message
Error occurred during initialization of VM
.
java/lang/NoClassDefFoundError: java/lang/Object
How can I solve this problem ?
Upvotes: 0
Views: 3488
Reputation: 480
This solved it for me (linux, after install via: sudo alien -i jdk-7u45-linux-x64.rpm
):
export JAVA_HOME=/usr/java/jdk1.7.0_45; export PATH=${PATH}:${JAVA_HOME}/bin (put in /etc/bash_bashrc)
cd ${JAVA_HOME}/jre/lib
../../bin/unpack200 rt.pack rt.jar
Upvotes: 0
Reputation: 2390
Looks like you got yourself a classpath issue , I suggest checking that you have everything included there .
Upvotes: 1
Reputation: 28687
The Java Virtual Machine is unable to find/load rt.jar
in your Java installation , which most likely means that it has been deleted or relocated .
My advice is to uninstall and re-install Java altogether .
Upvotes: 2
Reputation: 2641
What OS is your System running on? I once did this on Fedora 17 and I got this error. It turns out that the RPM wasn't installed properly.
The size of the RPM turns out to be bit smaller than the original size. The solution for you is to uninstall the JVM and reinstall it. Then it'll solve the problem.
Upvotes: 1