Ubuntu 11.04 open terminal JAVA_HOME=/usr/lib/jvm/java-6-sun-18.104.22.168/ export JAVA_HOME echo $JAVA_HOME ==>/usr/lib/jvm/java-6-sun-22.214.171.124/ 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