Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am installing openjdk-7 on my Ubuntu 10.04 server
But I find it to be difficult.

I am new to Ubuntu.
I have installed the python software properties as suggested by some advice I saw online and have uncommented these two lines:

deb http://archive.canonical.com/ubuntu oneiric partner
deb-src http://archive.canonical.com/ubuntu oneiric partner0

Also i have done these two successfully:

sudo add-apt-repository ppa:openjdk/ppa
apt-get update

apt-get install openjdk-7 is not working as I expect.

share|improve this question
    
apt-get install openjdk-7-jdk, this is the command for you to install jdk.....for other options try pressing tab after openjdk-7- –  Vineet Menon May 23 '12 at 8:48
    
@VineetMenon - if you moved that to an answer I would upvote it –  hbdgaf May 23 '12 at 8:53
    
@aking1012, :D. –  Vineet Menon May 23 '12 at 9:00
    
Big Thanks on teh 'update altertives...." :) –  Cyrolh Jul 22 at 18:37

2 Answers 2

The following command should install jdk, jre ..

apt-get install openjdk-7-jdk

In case you had previous version of the java installed you have to update your java configuration and set openjdk-7-jre to be your auto (default) using the following command.

sudo update-alternatives --config java
share|improve this answer
    
You may need to run sudo update-alternatives --config javac as well –  adamnfish May 8 at 22:39

The correct command is apt-get install openjdk-7-jdk, this is the command for you to install jdk,

for other options, from which I mean doc, jre, source, try pressing tab after openjdk-7- and apt will autocomplete it for you..

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.