[Sussex] vvv confused with java - jre, sdk and jvm

Richie Jarvis richie at helkit.com
Sun Jul 24 17:35:27 UTC 2005


The normal problem with java is that by default, Linux uses GCJ, which 
is compiled Java, and will not run most java apps out of the box.  The 
way to tell is to type at the prompt of the user you are trying to run 
the application under:

java -version

If it comes back with something referencing GCJ, then you know you are 
having this problem.  The trick to get it to use Sun's JRE (Java Runtime 
Environment) is to add $JAVA_HOME before everything else in the path:

export PATH=$JAVA_HOME:$PATH

should do it, then type java -version at the prompt, and you should see 
something similar to this:

$ java -version
java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)

Hope that helps!

Richie





More information about the Sussex mailing list