The Ubuntu developers have separated the Java components into several packages:
sun-java5-bin - Contains the binaries
sun-java5-demo - Contains demos and examples
sun-java5-doc - Contains the documentation
sun-java5-fonts - Contains the Lucida TrueType fonts from the JRE
sun-java5-jdk - Contains the metapackage for the JDK
sun-java5-jre - Contains the metapackage for the JRE
sun-java5-plugin - Contains the plug-in for Mozilla-based browsers
sun-java5-source - Contains source files for the JDK
Installing the Java Runtime Environment
Once you've got the multiverse repository enabled, installing Sun's Java package is easy. Simply open a terminal window and apt-get the package. Since you are going to be installing the JRE and the web browser plug-in, you'll be using the following command from a terminal window:
bill@constell:~$ sudo apt-get install sun-java5-jre sun-java5-plugin \\ sun-java5-fonts
Once apt-get downloads the packages and begins the installation, you'll get a screen that contains the Sun Operating System Distributor License for Java. Read the license, if you wish, and hit Enter to continue. You'll see a dialog that asks you if you agree with the DLJ license terms. Select Yes, and hit Enter; the JRE will finish installing.
At this point, Java is installed.
Confirming the Installation
You'll want to confirm that your system is configured properly for Sun's JRE. This is a two-step process. First, check that the JRE is properly installed by running the following command from a terminal. You should get similar output:
bill@constell:~$ java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
Congratulations you installed Java in Ubuntu
0 Comments