Installing Java

Hi … i have a problem, maybe someone here can help me.

I want to install java.

Im doing:

sudo apt-get install java-package

its giving me: could find package

and with sudo apt-get install sun-java6-jdk

its giving me package sun-java6-jdk has no installation candidate.

I did the same thing on my laptop (ubuntu) and it worked.

but when I go to my linode(ubuntu) via terminal it does not….

any ideas? can some one please help?

2 Replies

Might help if you told people what Distro you're using.

You have two options:

  • for the opensource package in the Ubuntu repos:
sudo apt-get install openjdk-6-jdk
  • if you want Sun's java you have to add it's repositories to apt:
echo "
deb lucid partner
deb-src lucid partner
" >> /etc/apt/sources.list

apt-get update

apt-get install sun-java6-jdk


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct