VAR-SOM-MX6 Android GS-java: Difference between revisions
(Created page with "= How to Install Oracle Java 6 update 45 on Ubuntu 12.04-64 Linux = Based on:<br> http://hendrelouw73.wordpress.com/2013/05/07/how-to-install-oracle-java-6-update-45-on-ubuntu...") |
|||
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= How to Install Oracle Java 6 update 45 on Ubuntu 12.04-64 Linux = | = How to Install Oracle Java 6 update 45 on Ubuntu 12.04-64 Linux = | ||
This is a step-by-step installation | This is a step-by-step installation instructions for Java on Ubuntu 64. | ||
Open your console window and enter the following command: | Open your console window and enter the following command: | ||
< | <pre>$ java –version | ||
<pre> | </pre> | ||
If you get the following result, you already have Java 6 update 37 installed and can ignore the rest of the steps: | If you get the following result, you already have Java 6 update 37 installed and can ignore the rest of the steps: | ||
java version | java -version | ||
Java(TM) SE Runtime Environment (build 1.6.0_45-b06) | java version "1.6.0_45"<br> | ||
Java HotSpot(TM) | Java(TM) SE Runtime Environment (build 1.6.0_45-b06)<br> | ||
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)<br> | |||
== Step 1: Create the installation folder == | |||
<pre>$ sudo mkdir -p /usr/lib/jvm | |||
</pre> | |||
The –p option ensures that all folders in the mkdir path 1s created. | |||
== Step 2: Download Oracle Java == | |||
Download jdk-6u45-linux-x64.bin and jre-6u45-linux-x64.bin from:<br> | |||
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jre-6u45-oth-JPR<br> | |||
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR | |||
== Step 3: Navigate to the folder to which you downloaded the Java installation files == | |||
Typicly: | |||
<pre>$ cd ~/Downloads | |||
</pre> | |||
== Step 4: Move the downloaded files to the installation folder == | |||
<pre>$ sudo mv jdk-6u45-linux-x64.bin /usr/lib/jvm | |||
$ sudo mv jre-6u45-linux-x64.bin /usr/lib/jvm | |||
</pre> | |||
== Step 5: Change to the installation folder. == | |||
<pre>$ cd /usr/lib/jvm | |||
</pre> | |||
== Step 6: Make the downloaded binaries executable. == | |||
Step | <pre>$ sudo chmod a+x jdk-6u45-linux-x64.bin | ||
$ sudo chmod a+x jre-6u45-linux-x64.bin | |||
</pre> | |||
== Step 7: Extract both compressed binary files. == | |||
<pre>$ sudo ./jdk-6u45-linux-x64.bin | |||
$ sudo ./jre-6u45-linux-x64.bin | |||
</pre> | |||
Step 7 | |||
sudo ./jdk-6u45-linux- | |||
sudo ./jre-6u45-linux- | |||
== Step 8: Check your extracted folder names. == | |||
<pre>$ ls -l | |||
</pre> | |||
Response: | Response: | ||
jdk1.6.0_45 | jdk1.6.0_45 | ||
jre1.6.0_45 | jre1.6.0_45 | ||
== Step 9: Inform Ubuntu where your Java installation is located. == | |||
<pre>$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.6.0_45/bin/java 1 | |||
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1 | |||
</pre> | |||
== Step 10: Inform Ubuntu that this is your default Java installation. == | |||
<pre>$ sudo update-alternatives --set java /usr/lib/jvm/jre1.6.0_45/bin/java | |||
$ sudo update-alternatives --set javac /usr/lib/jvm/jdk1.6.0_45/bin/javac | |||
</pre> | |||
== Step 11: Update your system-wide PATH. == | |||
Edit your /etc/profile file using: | Edit your /etc/profile file using: | ||
<pre>$ sudo gedit /etc/profile | |||
</pre> | |||
sudo | |||
Add the following entries to the bottom of the file: | Add the following entries to the bottom of the file:<br> | ||
JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45<br> | |||
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin<br> | |||
export JAVA_HOME<br> | |||
export PATH<br> | |||
Save your changes and exit | |||
JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45 | |||
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin | |||
export JAVA_HOME | |||
export PATH | |||
== Step 12:<br> == | |||
Step | Reload your system-wide PATH. | ||
<pre>$ . /etc/profile | |||
</pre> | |||
. /etc/profile | |||
== Step 13: Test your new installation. == | |||
<pre>$ java -version | |||
</pre> | |||
Response: | Response: | ||
java version "1.6.0_45"<br> | |||
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)<br> | |||
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)<br> | |||
<pre>$ javac -version | |||
java version | </pre> | ||
Java(TM) SE Runtime Environment (build 1.6.0_45-b06) | |||
Java HotSpot(TM) | |||
javac | |||
Response: | Response: | ||
javac 1.6.0_45 | javac 1.6.0_45 | ||
Step | |||
== Step 14: Congratulations! You have just installed Oracle Java on Ubuntu Linux! == |
Latest revision as of 10:20, 20 September 2014
How to Install Oracle Java 6 update 45 on Ubuntu 12.04-64 Linux
This is a step-by-step installation instructions for Java on Ubuntu 64.
Open your console window and enter the following command:
$ java –version
If you get the following result, you already have Java 6 update 37 installed and can ignore the rest of the steps:
java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
Step 1: Create the installation folder
$ sudo mkdir -p /usr/lib/jvm
The –p option ensures that all folders in the mkdir path 1s created.
Step 2: Download Oracle Java
Download jdk-6u45-linux-x64.bin and jre-6u45-linux-x64.bin from:
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jre-6u45-oth-JPR
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR
Typicly:
$ cd ~/Downloads
Step 4: Move the downloaded files to the installation folder
$ sudo mv jdk-6u45-linux-x64.bin /usr/lib/jvm $ sudo mv jre-6u45-linux-x64.bin /usr/lib/jvm
Step 5: Change to the installation folder.
$ cd /usr/lib/jvm
Step 6: Make the downloaded binaries executable.
$ sudo chmod a+x jdk-6u45-linux-x64.bin $ sudo chmod a+x jre-6u45-linux-x64.bin
Step 7: Extract both compressed binary files.
$ sudo ./jdk-6u45-linux-x64.bin $ sudo ./jre-6u45-linux-x64.bin
Step 8: Check your extracted folder names.
$ ls -l
Response: jdk1.6.0_45 jre1.6.0_45
Step 9: Inform Ubuntu where your Java installation is located.
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.6.0_45/bin/java 1 $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
Step 10: Inform Ubuntu that this is your default Java installation.
$ sudo update-alternatives --set java /usr/lib/jvm/jre1.6.0_45/bin/java $ sudo update-alternatives --set javac /usr/lib/jvm/jdk1.6.0_45/bin/javac
Step 11: Update your system-wide PATH.
Edit your /etc/profile file using:
$ sudo gedit /etc/profile
Add the following entries to the bottom of the file:
JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
Save your changes and exit
Step 12:
Reload your system-wide PATH.
$ . /etc/profile
Step 13: Test your new installation.
$ java -version
Response:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
$ javac -version
Response: javac 1.6.0_45