Installing Java under Ubuntu
After installing unxmit on a
Ubuntu 11.4 system, I discovered that Java’s JRE was missing. The symptoms were these: I invoked ./unxmit and received a popup window.
These are the steps I took to install Java on my Ubuntu machine.
1. Download from Java from www.java.org.
2. Created a target directory to unpack the Java download. /opt/java/64
3. Moved the java download to the target directory.
4. Changed the file authorization for the java download
5. Unpacked the java download
6. Register /opt/java/64/jre1.6.0_27/bin/java as a new java executable.
7. Register /opt/java/64/jre1.6.0_27/bin/java as the java executable of choice.
Step 1: Download
Download Java from www.java.org; and clicked on “Downloads” on the red menu bar. The Oracle website presented the window below. Ubuntu’s documentation said to download the 32-bit or 64-bit self-extracting binary that does *not* have RPM in its name. When I double-clicked on the hyperlink, it saved jre-6u27-linux-x64.bin in ~/Downloads.
Steps 2 through7 are performed under a Terminal application. That is, from Ubuntu’s menu bar
Applications->Accessories->Terminal
Step 2: Create Target Library
cd /opt
sudo
mkdir java
sudo
mkdir 64
Thus, final directory is /opt/java/64
Step 3: Move Binary to /opt/java/64
sudo
mv ~/Downloads/jre-6u27-linux-x64.bin .
Step 4: Change Authorization for Self-extracting Binary
sudo
chmod 755 jre-su27-linux-x64.bin
Step 5 Unpacked the java download
sudo ./jre-6u27-linux-x64.bin
Step 6: Register new java executable.
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.6.0_27/bin/java" 1
Step 7: Register java executable of choice.
sudo update-alternatives --set java /opt/java/64/jre1.6.0_27/bin/java
All Together:
cd /opt
sudo
mkdir java
sudo
mkdir 64
sudo
mv ~/Downloads/jre-6u27-linux-x64.bin .
sudo
chmod 755 jre-su27-linux-x64.bin
sudo ./jre-6u27-linux-x64.bin
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.6.0_27/bin/java" 1
sudo update-alternatives --set java /opt/java/64/jre1.6.0_27/bin/java