java lang NoClassDefFoundError java lang Object

java lang NoClassDefFoundError java lang Object

If you getting below exception during working with Java and this happens if you try to execute commands which uses java and searching in classpath:

Solution: First open your command prompt and see if java has been set properly or not:

As you see above in my case java classpath is messed up and getting error. This is happenning due to many version of java installed in my system see below:

java lang NoClassDefFoundError java lang Object

Uninstalled all java from your system first through program file in windows. Once all version of java in uninstalled from your system then open new command prompt again and check if still java classpath is set:

Now you are good. Set java path again through your system environment and put whatever version you are using. And validate java and javac command as below if java classpath setup correclty you will see below:

Isusue should be resolved now..

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *