where can I define the environment variable JAVA_HOME (export JAVA_HOME=path)? I'm using ubuntu 11.10 thanks for help
define the environment variable JAVA_HOME
1.9k Views Asked by koukou At
2
There are 2 best solutions below
1

If you want to set it only for your user, it should be under : ~/.pam_environment - This file is specifically meant for setting a user's environment. It is not a script file, but rather consists of assignment expressions, one per line.
If you want to set it system-wide it should be under : /etc/environment - This file is specifically meant for system-wide environment variable settings. It is not a script file, but rather consists of assignment expressions, one per line. Specifically, this file stores the system-wide locale and path settings.
All the information and details can be found at : Environment Variables
Add it to the bottom of your ~/.bashrc file