Install Oracle Java 7 on Debian Linux

Posted on 26-03-2014 07:15 by graham
To install Oracle Java on Debian, follow the steps below.

First, add the following two repositories to /etc/apt/sources.list:
/etc/apt/sources.list
deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main

and run commands to update apt:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
apt-get update

Then just install Java:
apt-get install oracle-java7-installer

Finally, if you already had another version of Java installed and you want to make Java 7 your default Java version, run:
apt-get install oracle-java7-set-default

To verify your installation, execute:
java -version

and you should see something like this:
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
Comments

 

Add comment

Has this tutorial been helpful to you? Or do you see anything wrong? We appreciate your opinion!
Your comment:
Show formatting hints
HTML is disallowed, but in your text you can use the following markup
  • [code][/code] for a block of code
  • [tt][/tt] for inline code
  • [link]link href|link anchor[/link] for links
  • [b][/b] for bold text
Email:
+ Ask a question
If you have a technical question related to programming and computers, ask it here. Other users will help you solve it!
Unanswered questions
Share your knowledge by helping others solve their problems