Skip to content

How do I download and install Java for my Linux computer?

To get Sun Java under Ubuntu on Intel, you should enable the Universe repository in Add/Remove programs, and install either the openjdk-6-jre package or the sun-java6-bin package.

root@laptop:~# apt-cache search jre
default-jre - Standard Java or Java compatible Runtime
default-jre-headless - Standard Java or Java compatible Runtime (headless)
docbook-xsl - stylesheets for processing DocBook XML files to various output formats
docbook-jrefentry - DocBook XML JRefEntry DTD
kaffe - A JVM to run Java bytecode
libjrexx-java - automaton based regular expression API for java
icedtea-6-jre-cacao - Alternatve JVM for OpenJDK, using Cacao
openjdk-6-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-6-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-6-jre-lib - OpenJDK Java runtime (architecture independent libraries)
openoffice.org - full-featured office productivity suite
openjdk-6-jre-zero - Alternatve JVM for OpenJDK, using Zero/Shark
sun-java5-bin - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture dependent files)
sun-java5-fonts - Lucida TrueType fonts (from the Sun JRE)
sun-java5-jre - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture independent files)
sun-java5-plugin - The Java(TM) Plug-in, Java SE 5.0
sun-java6-bin - Sun Java(TM) Runtime Environment (JRE) 6 (architecture dependent files)
sun-java6-fonts - Lucida TrueType fonts (from the Sun JRE)
sun-java6-jre - Sun Java(TM) Runtime Environment (JRE) 6 (architecture independent files)
sun-java6-plugin - The Java(TM) Plug-in, Java SE 6

You probably have multiple java versions installed. You need to change the default java version to use. This typically involves changing the /usr/bin/java symlink.

On Ubuntu you can write:

sudo apt-get install sun-java6-jre

Once you have installed Java, make sure it is available from the command line. You can verify this by opening a new terminal window and typing:

java -version

Reference : http://www.java.com/en/download/help/5000010500.xml

Post a Comment

You must be logged in to post a comment.