Friday 31 August 2012

How to set environment variable JAVA_HOME in Ubuntu

We have to set the environment variable in Ubuntu like JAVA_HOME after installing jdk for first time. In Ubuntu for setting up the environment variable follow the following instruction.

First open your terminal [Ctrl + Alt + t], then enter the following command to open the .bashrc file as shown in snapshot.

sudo gedit ~/.bashrc

Now it will open .bashrc file into your gedit text editor, scroll the file to the end and add your environment variable after 'export' keyword and save file.





Now check those environment variable by printing them in terminal using echo keyword.



Now your environment variable are ready for work.

No comments:

Post a Comment