Google Website Translator Gadget

Sunday, December 12, 2010

How to configure JAVA_HOME on Ubuntu 10.04

I found this good article for setting the JAVA_HOME variable on Ubuntu Linux:
http://www.zimbio.com/the+ubuntu+guy/articles/82/How+set+JAVA_HOME+environment+variable+Ubuntu

I have now used those instructions for my Ubuntu 10.04 Netbook Remix and a Ubuntu 10.04 Server LTS. Both works well.

Edit the startup bash file by opening up a terminal and typing:
sudo vi /etc/bash.bashrc

At the vi editor press the [i] key and add the following lines
JAVA_HOME=/usr/bin/java
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

At the vi editor press the [Esc] key and type :wq then press the [Enter] key

Now restart the server by typing the following at the terminal:
shutdown -r now

After the computer has restarted, open up a terminal and check JAVA_HOME by typing:
echo $JAVA_HOME

I am using the JAVA_HOME path for running the Palo ETL program for extracting and loading economic data. A blog post for another time.



No comments: