How do I install Java, including in my browser, so websites with Java work?
Ubuntu – How to install Java
javaopenjdksoftware installation
javaopenjdksoftware installation
How do I install Java, including in my browser, so websites with Java work?
Best Answer
There are several implementations of Java. The three most common implementations when talking about it for Ubuntu are:
Since Ubuntu 11.10 (Oneiric Ocelot) and due to license issues Ubuntu will no longer distribute Oracle's JDK and JRE. Also, previous versions supplied on PPAs suffer from security issues and are not recommended to be installed on any Ubuntu system.
There are no more supported .deb releases from Ubuntu with reference to Sun Java or Oracle Java, Ubuntu officially supports OpenJDK and OpenJRE implementation of Java which is the base for Oracle's own implementation.
OpenJRE is the official implementation of Java Runtime Environment (JRE) for your Ubuntu systems and should suffice to run any Java program that you might require and it's included in the main repository and it's easily installable.
OpenJRE
By opening a terminal and typing
this installs
openjdk-11-jre
(at the time of writing this, you may install a newer java version in the future, which is now, if it installs a different openjdk version I guess)The
openjdk-11-jre
package contains just the Java Runtime Environment. If you want to develop Java programs then install thedefault-jdk
package:Also important is to install the wrapper for supporting Java applications on your web browser, the Iced-Tea Java Plugin.
IcedTea Plugin
Or via a terminal
Or look for
icedtea-plugin
in the Ubuntu Software Center.To make sure that you are running the correct version of Java, use this command to set your choice:
java -version
should display the choice you previously made.If you need to install OpenJDK-JRE 6 or OpenJDK-JDK 6
openjdk-6-jre
(click to install) is available for installation for Ubuntu 8.04 (Hardy Heron) and up.Install it with
Or if you need the developers' package,
openjdk-6-jdk
(click to install), install it with:A version of the
icedtea-plugin
(click to install) is also available to install if you are going to use OpenJDK 6.Install it with:
If you really want to use Oracle's Java SE Platform, see How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?.