Showing posts with label jre6. Show all posts
Showing posts with label jre6. Show all posts

Tuesday, April 21, 2015

How to install OpenJDK on CentOS/RHEL

P
OpenJDK (Open Java Development Kit) is a free and open source implementation of the Java Platform, Standard Edition (Java SE).[1] It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GNU General Public License (GNU GPL) with a linking exception. Were it not for the GPL linking exception, components that linked to the Java class library would be subject to the terms of the GPL license.

Currently, there is supported OpenJDK6, OpenJDK7, OpenJDK8. This article will show you how to install these.

Find out which version is available

[root@localhost Desktop]# yum search openjdk

Output

[root@localhost ~]# yum search openjdk
Loaded plugins: fastestmirror, refresh-packagekit, security
base                                                     | 3.7 kB     00:00
base/primary_db                                          | 3.6 MB     00:00
extras                                                   | 3.4 kB     00:00
extras/primary_db                                        |  29 kB     00:00
updates                                                  | 3.4 kB     00:00
updates/primary_db                                       | 2.6 MB     00:01
============================= N/S Matched: openjdk =============================
java-1.6.0-openjdk.i686 : OpenJDK Runtime Environment
java-1.6.0-openjdk-demo.i686 : OpenJDK Demos
java-1.6.0-openjdk-devel.i686 : OpenJDK Development Environment
java-1.6.0-openjdk-javadoc.i686 : OpenJDK API Documentation
java-1.6.0-openjdk-src.i686 : OpenJDK Source Bundle
java-1.7.0-openjdk.i686 : OpenJDK Runtime Environment
java-1.7.0-openjdk-demo.i686 : OpenJDK Demos
java-1.7.0-openjdk-devel.i686 : OpenJDK Development Environment
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.7.0-openjdk-src.i686 : OpenJDK Source Bundle
java-1.8.0-openjdk.i686 : OpenJDK Runtime Environment
java-1.8.0-openjdk-demo.i686 : OpenJDK Demos
java-1.8.0-openjdk-devel.i686 : OpenJDK Development Environment
java-1.8.0-openjdk-headless.i686 : OpenJDK Runtime Environment
java-1.8.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.8.0-openjdk-src.i686 : OpenJDK Source Bundle
icedtea-web.i686 : Additional Java components for OpenJDK - Java browser plug-in
                 : and Web Start implementation

  Name and summary matches only, use "search all" for everything.

Installing OpenJDK 6

In your terminal, type this command to install OpenJDK 6 and OpenJRE 6 respectively

[root@localhost Desktop]# yum install java-1.6.0-openjdk-devel java-1.6.0-openjdk

After installation finished, check your machine that has been installed OpenJDK6

[root@localhost Desktop]# java -version

Output

[root@localhost ~]# java -version
java version "1.6.0_35"
OpenJDK Runtime Environment (IcedTea6 1.13.7) (rhel-1.13.7.1.el6_6-i386)
OpenJDK Client VM (build 23.25-b01, mixed mode)
OpenJDK is installed in /usr/lib/jvm/java, therefore, you can set your JAVA_HOME with this path
# export JAVA_HOME=/usr/lib/jvm/java
Installing OpenJDK 7

Type this command to install OpenJDK 7 and OpenJRE 7 respectively

[root@localhost Desktop]# yum install java-1.7.0-openjdk-devel java-1.7.0-openjdk

After installation finished, check your machine that has been installed OpenJDK 7

[root@localhost Desktop]# java -version

Output

[root@localhost ~]# java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (rhel-2.5.5.1.el6_6-i386 u79-b14)
OpenJDK Client VM (build 24.79-b02, mixed mode, sharing)
OpenJDK is installed in /usr/lib/jvm/java, therefore, you can set your JAVA_HOME with this path
# export JAVA_HOME=/usr/lib/jvm/java
Installing OpenJDK 8

Type this command to install OpenJDK 8 and OpenJRE 8 respectively

[root@localhost Desktop]# yum install java-1.8.0-openjdk-devel java-1.8.0-openjdk

After installation finished, check your machine that has been installed OpenJDK 8

[root@localhost Desktop]# java -version

Output

[root@localhost ~]# java -version
openjdk version "1.8.0_45"
OpenJDK Runtime Environment (build 1.8.0_45-b13)
OpenJDK Server VM (build 25.45-b02, mixed mode)
OpenJDK is installed in /usr/lib/jvm/java, therefore, you can set your JAVA_HOME with this path
# export JAVA_HOME=/usr/lib/jvm/java

Sunday, March 29, 2015

How to install JDK 6 on CentOS

P
This article today will show you how to download and install JDK 6 on CentOS through command line.
To download installer, just follow these commands
For x86 machine
[root@localhost phuongvu]# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-i586-rpm.bin
And x64 machine
[root@localhost phuongvu]# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-x64-rpm.bin
Now check whether it is installed
[root@localhost phuongvu]# ls
Desktop    Downloads                    Music     Public     Videos
Documents  jdk-6u45-linux-i586-rpm.bin  Pictures  Templates
Grant execute permission for it
[root@localhost phuongvu]# chmod +x jdk-6u45-linux-i586-rpm.bin
Now, just install
[root@localhost phuongvu]# ./jdk-6u45-linux-i586-rpm.bin
Output:
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
  inflating: jdk-6u45-linux-i586.rpm
  inflating: sun-javadb-common-10.6.2-1.1.i386.rpm
  inflating: sun-javadb-core-10.6.2-1.1.i386.rpm
  inflating: sun-javadb-client-10.6.2-1.1.i386.rpm
  inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm
  inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm
  inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm
Preparing...                ########################################### [100%]
   1:jdk                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        tools.jar...
        localedata.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...
Installing JavaDB
Preparing...                ########################################### [100%]
   1:sun-javadb-common      ########################################### [ 17%]
   2:sun-javadb-core        ########################################### [ 33%]
   3:sun-javadb-client      ########################################### [ 50%]
   4:sun-javadb-demo        ########################################### [ 67%]
   5:sun-javadb-docs        ########################################### [ 83%]
   6:sun-javadb-javadoc     ########################################### [100%]

Done.
Now check your JDK version
[root@localhost phuongvu]# java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) Client VM (build 20.45-b01, mixed mode, sharing)
Done.