How to set Environmental Variable?

Solution 1:

Go to a terminal and type :

export JAVA_HOME=/usr/lib/jvm/java-6-sun

and consequently for the others

Don't forget these values will be only available in your current terminal session. You'll have to add these to a persistent environnement file like ~/.bashrc or ~/.zshrc to keep them among a terminal session restart

To check for existing variables, type env