Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to install Java 1.5 on Debian.

But when I write

apt-get install java-package

in bash, the error

unable to locate package java-package

is shown. Can anybody help me?

share|improve this question

migrated from Jul 25 '11 at 15:03

This question came from our site for professional and enthusiast programmers.

Try running apt-get update and see if it works now –  Rafe Kettler Jul 25 '11 at 14:45
On Ubuntu, the package is named "openjdk-6-jre" for the OpenJDK JVM. –  João Fernandes Jul 25 '11 at 14:51
Don't you use sudo ... for apt-get? –  user unknown Jul 25 '11 at 15:34

2 Answers 2

That's probably because there is no java-package in Debian (where did you get that package name, BTW?)…

What you need is one of the Java Runtime Environment (JRE) packages:

This is to be able to run Java applications. If you want to develop, just install the corresponding -jdk package (e.g. sun-java6-jdk).

share|improve this answer

To intall Java Runtime Environment on Debian, Ubuntu, etc.

# apt-get install openjdk-7-jre

To intall package to developing programs using Java on Debian, Ubuntu, etc.

# apt-get install openjdk-7-jdk


share|improve this answer

Your Answer


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