# Ubuntu – How to set JAVA environment variables system wide

environment-variables

I work as java/j2ee application developer so kindly tell me how to set JAVA_HOME, JRE_HOME, CLASSPATH so that I may use Tomcat, Mysql ,java all together in Terminal.

I may be using all together in a pure CLI server environment, or in a GUI desktop environment.

• Using 12.04, placing the information in /etc/environment worked for me:
tku@buster:~\$ cat /etc/environment