Java - Error occurred during initialization of VM



Hi,

I just installed JDK1.5 on a linux machine and added it bin directory
to the path variable.

However, whenever i execute java, it give me the following error

yantra:/usr/java/jdk1.5.0_06/lib# java
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

am i missing something. like classpath.. i think rt.jar is included in
classpath by default

please give me any clue

thanks

on ali



I had this error too under Websphere. The solution was to point to the correct rt.jar file.
Since I did an upgrade of my j2sdk my java projects were trying to complie with another rt.jar version... also I had an major:minor version error but this fixs too.

Probably you aren't running the java you just installed.

What do "type -a java" and "type -a javac" say?

i used "which java" command and it showed me the correct path