
When I test my Java Virtual Machine at www.java.com, I'm congratulated (no less), told I have the latest version, 1.5.0_09, and told that the JRE is functioning correctly. However, when, in a terminal, I issue the command "java -version", I get the following message: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object I've tried to figure out how to resolve the contradiction in favour of the former statement, but it's beyond me. A snippet I've perhaps understood seems to suggest that rt.jar has the class file for java.lang.Object. I looked for rt.jar on my system and found I had two of them: /usr/lib/jre/lib/rt.jar; and /usr/java/jre1.5.0_09/lib/rt.jar. Why I have two, I don't know. The first one is smaller and seems to be older. I tried renaming it to rt.jar.old and then issuing the java -version command again. That had no positive effect, so I renamed it rt.jar again. Another snippet suggested that the problem might be that rt.jar was not included in the boot class path. I'm not sure if that's the same thing as not having the correct entry for JAVA_HOME, but I saw it suggested that, if there was no entry identifying Java's "home directory" Java might fail to identify its home directory. I found an entry about JAVA_HOME in /etc/profile.d/java.sh. It was: export JAVA_HOME=/usr/bin/java. Well, /usr/bin/java bears no resemblance to either of the two directories where I found the two rt.jar files. I did try substituting export JAVA_HOME=/usr/java/jre1.5.0_09/ for the original entry, but that didn't work. If anyone has any further suggestions, I'd be grateful. Leslie PS Maybe I should add that when I run Firefox 2.0 and get a list of plugins, the java plugin is there. It seems to be working properly.
participants (1)
-
Leslie Katz