July 8, 2009, 1:07 a.m.
posted by void
Install Java
The modern web-browsing experience requires Java. Here's how to install Java and caffeinate your web browser. Ubuntu's an amazing Linux distribution for lots of different reasons, but one of the things people find attractive about it is the fact that it ships with lots of different software, preconfigured and ready to use. However, until recently, one of the things that the Ubuntu developers couldn't include was the Sun Java Runtime Environment (JRE), because it used a nonfree license that prevented its bundling with a Linux distribution. Recently, however, Sun Microsystems relaxed the restrictions on the Java license, introducing the Distro License for Java (DLJ). This new license allows distributors to ship Sun's JRE and Java Development Kit (JDK) as installable packages, rather than the self-extracting binaries that were previously available. It also gives Linux distributors the ability to define the packaging, installation, and support for Java within their Linux distribution. As such, Dapper Drake now ships with Sun's Java available as a non-free package in the multiverse repository. You'll need to have the universe and multiverse repositories enabled [Hack #60] to install Java. The Ubuntu developers have separated the Java components into several packages:
Installing the Java Runtime EnvironmentOnce 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@constellation:~$ 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 InstallationYou'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@constellation:~$ 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)
If the JRE is properly installed, confirm that the Java plug-in is installed in your browser by opening Firefox and typing about:plugins in the address bar (see Figure). Verifying that the Java web plug-in is installed
Congratulations, you've caffeinated your browser! You can now surf to Java-enabled web sites and use Java applications! |
- Comment
