Ubuntu 11.04 open terminal JAVA_HOME=/usr/lib/jvm/java-6-sun-188.8.131.52/ export JAVA_HOME echo $JAVA_HOME ==>/usr/lib/jvm/java-6-sun-184.108.40.206/ i close the terminal open another terminal echo $JAVA_HOME ==>
Any idea why JAVA_HOME was not saved ?
Your missing the "-p" for "permanent".
It has some bugs, but here is what I use.
The environment variable is only set for that session and its children. When you close that terminal process, those environment variables are gone. Typically I would set them in ~/.profile, but that may not be the preferred method.
The Ubuntu documentation for this is here