Environment variables provide a way to influence the behavior of software on the system. For example, the "LANG" environment variable determines the language in which software programs communicate with the user.
The meaning of an environment variable and the format of its value are determined by the application using it. There are quite a few well-known environment variables for which the meaning and the format have been agreed upon and they are used by many applications.
After installing Java, I needed to set the JAVA_HOME var, which was pointing to my JVM installation (/usr/lib/jvm/java-6-sun). Normally, I always set these vars in ~/.bashrc. But a lot of applications didn't seem to pick up this variable. I most of the time received errors as "JAVA_HOME NOT SET".
After Googling a while, I came to the conclusion that you have to set these vars in /etc/environment. In this way, all applications seem to pick up the JAVA_HOME variable :-)
Add new comment