0

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?

migrated from stackoverflow.com 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
  • 2
    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
7

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).

1

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

from http://namhuy.net/1195/how-to-install-oracle-java-jdk-7.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy