How to Fix Error Occurred During Initialization of VM Java/Lang/Noclassdeffounderror: Java/Lang/Object
This tutorial demonstrates the Error occurred during initialization of VM java/lang/noclassdeffounderror: java/lang/object
error in Java.
Error Occurred During Initialization of VM java/lang/noclassdeffounderror: java/lang/object
The Error occurred during initialization of VM java/lang/noclassdeffounderror: java/lang/object
occurs when systems get confused when running Java. This occurs when we run Java as an environment variable, but running Java from its directory will work properly.
Whenever Error occurred during initialization of VM java/lang/noclassdeffounderror: java/lang/object
occurs, Java is installed properly, and the correct path is set for the environment variables.
The reasons for this error are ambiguous, but some solutions can be applied in different scenarios. The reasons include:
- When we updated the Java Development Kit (JDK) but forgot to update the Java Runtime Environment (JRE). In the recent versions, JRE is included in the JDK, so we don’t have to install it separately.
- When an unknown application has copied
java.exe
files to the Windows directory, and Windows start running Java from the Windows directory, this error will occur when the supportive files are not found.
The error looks like this when we run Java in the CMD:
Error occurred during initialization of VM
java/lang/noclassdeffounderror: java/lang/object
Running Eclipse
Usually, when this error stops Eclipse from initializing. The Eclipse problem can be solved following the steps below.
-
Go to the Eclipse directory.
-
Open the
eclipse.ini
file. -
Add the following lines with your path to the
ini
file before thevmargs
:
-vm
C:\Program Files\Java\jdk1.7.0_10\bin\javaw.exe
Save the eclipse.ini
file and run Eclipse.
Check the Windows Directory
If the Error Occurred During Initialization of VM java/lang/noclassdeffounderror: java/lang/object
error is occurring, then you should follow some steps to know the ambiguous reasons:
- Go to the Windows directory.
- Check if you can find the
exe
file from Java. - These files are copied by an application on Windows.
- Deleting these files may solve the problem.
- Finding the application is not easy, but you can check all the applications running Java.
Sheeraz is a Doctorate fellow in Computer Science at Northwestern Polytechnical University, Xian, China. He has 7 years of Software Development experience in AI, Web, Database, and Desktop technologies. He writes tutorials in Java, PHP, Python, GoLang, R, etc., to help beginners learn the field of Computer Science.
LinkedIn FacebookRelated Article - Java JVM
Related Article - Java Error
- How to Fix the Error: Failed to Create the Java Virtual Machine
- How to Fix the Missing Server JVM Error in Java
- How to Fix the 'No Java Virtual Machine Was Found' Error in Eclipse
- How to Fix Javax.Net.SSL.SSLHandShakeException: Remote Host Closed Connection During Handshake
- How to Fix the Error: Failed to Create the Java Virtual Machine
- How to Fix Java.Lang.VerifyError: Bad Type on Operand Stack