|
How to set J2SE SDK environment variables on Fedora 2
I want to be able to compile and run java programs from my /home directory. I have tried setting the environment variables by typing the following in the command prompt:
PATH=$PATH:/usr/java/j2sdk1.4.2_05/bin
JAVA_HOME=/usr/java/j2sdk1.4.2_05
export PATH
It works fine at first. I type
java -version
and it returns:
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
When I exit the command terminal it no longer works. I type java -version and it returns:
bash: java: command not found
How can I get this to work so I can always run java programs from my /home directory?
Thanks,
John
|