HostSEO Blog

Stories and News from IT Industry, Reviews & Tips | Technology Blog

Install JAVA in Ubuntu or debian manually

The following steps will help you to install java in ubuntu / debian  manually

Download the jdk 7 tar  file

mkdir -pv /usr/lib/jvm
cd /usr/lib/jvm
wget -c http://downloads-url-of-jdk/java/jdk-7u10-linux-x64.tar.gz
tar -xzf jdk-7u10-linux-x64.tar.gz
cd /usr/lib/jvm/jdk1.7.0_10

Now set the alternatives path

update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jdk1.7.0_10/bin/java” 1
update-alternatives –install “/usr/bin/javac” “javac” “/usr/lib/jvm/jdk1.7.0_10/bin/javac” 1
update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/lib/jvm/jdk1.7.0_10/bin/javaws” 1

Now edit the bashrc file and set teh following environment variables

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_10
export CLASSPATH=.:$JAVA_HOME/lib/
export PATH=$JAVA_HOME/bin:$PATH

Now you can test the java version using the following command,

# javac -version

PS: If you have multiple alternative , please configure it using   update-alternatives –config java

Subscribe Now

10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!

Archive Calendar


Born in 2004 ... Trusted By Clients n' Experts

SEO Stars

They never made me feel silly for asking questions. Help me understand how to attract more people and improve my search engine ranking.

Read More

Emily Schneller Manager at Sabre Inc
SEO Stars

Took advantage of Hostseo's superb tech support and I must say, it is a very perfect one. It is very fast, servers reliability is incredible.

Read More

Leena Mäkinen Creative producer
SEO Stars

We're operating a worldwide network of servers with high quality standards requirements, we’ve choose hostseo to be our perfect partner.

Read More

Ziff Davis CEO at Mashable
SEO Stars

It’s very comfortable to know I can rely about all technical issues on Hostseo and mostly that my website and emails are safe and secured here.

Read More

Isaac H. Entrepreneur
SEO Stars

With hostseo as a hosting partner we are more flexible and save money due to the better packages with great pricing, free SEO n' free SSL too!

Read More

Madeline E. Internet Professional