Difference between revisions of "Howto install proprietary Java from Oracle"
(→JRE 7u6 64bit) |
(→JRE 7u6 32bit) |
||
Line 87: | Line 87: | ||
2. Type | 2. Type | ||
su - | su - | ||
− | and provide root | + | and provide root password |
3. Go to /home/<your username>/Downloads | 3. Go to /home/<your username>/Downloads | ||
Line 99: | Line 99: | ||
ln -sf ./jre1.7.0_06 /usr/java/latest | ln -sf ./jre1.7.0_06 /usr/java/latest | ||
ln -sf ./latest /usr/java/default | ln -sf ./latest /usr/java/default | ||
− | 7. Install | + | |
− | alternatives --install /usr/bin/java java /usr/java/ | + | R4. Install RPM package |
− | + | urpmi jre-7u6-linux-i586.rpm | |
− | alternatives --install /usr/bin/javaws javaws /usr/java/ | + | |
− | + | 7. Install Browser Plugins | |
− | alternatives --install /usr/ | + | alternatives --install /usr/lib/xulrunner-5.0/plugins/libjavaplugin.so xulrunner-1.9-javaplugin.so /usr/java/jre1.7.0_06/lib/i386/libnpjp2.so 17065 |
− | + | alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /usr/java/jre1.7.0_06/lib/i386/libnpjp2.so 17065 | |
− | export JAVA_HOME="/usr/java/ | + | 8. Install JRE and man pages |
+ | alternatives --install /usr/bin/ControlPanel ControlPanel /usr/java/jre1.7.0_06/bin/ControlPanel 17065 | ||
+ | alternatives --install /usr/bin/java java /usr/java/jre1.7.0_06/bin/java 17065 --slave /usr/share/man/man1/java.1 java.1 /usr/java/jre1.7.0_06/man/man1/java.1 | ||
+ | alternatives --install /usr/bin/java_vm java_vm /usr/java/jre1.7.0_06/bin/java_vm 17065 | ||
+ | alternatives --install /usr/bin/javaws javaws /usr/java/jre1.7.0_06/bin/javaws 17065 --slave /usr/share/man/man1/javaws.1 javaws.1 /usr/java/jre1.7.0_06/man/man1/javaws.1 | ||
+ | alternatives --install /usr/bin/jcontrol jcontrol /usr/java/jre1.7.0_06/bin/jcontrol 17065 | ||
+ | alternatives --install /usr/bin/keytool keytool /usr/java/jre1.7.0_06/bin/keytool 17065 --slave /usr/share/man/man1/keytool.1 keytool.1 /usr/java/jre1.7.0_06/man/man1/keytool.1 | ||
+ | alternatives --install /usr/bin/orbd orbd /usr/java/jre1.7.0_06/bin/orbd 17065 --slave /usr/share/man/man1/orbd.1 orbd.1 /usr/java/jre1.7.0_06/man/man1/orbd.1 | ||
+ | alternatives --install /usr/bin/pack200 pack200 /usr/java/jre1.7.0_06/bin/pack200 17065 --slave /usr/share/man/man1/pack200.1 pack200.1 /usr/java/jre1.7.0_06/man/man1/pack200.1 | ||
+ | alternatives --install /usr/bin/policytool policytool /usr/java/jre1.7.0_06/bin/policytool 17065 --slave /usr/share/man/man1/policytool.1 policytool.1 /usr/java/jre1.7.0_06/man/man1/policytool.1 | ||
+ | alternatives --install /usr/bin/rmid rmid /usr/java/jre1.7.0_06/bin/rmid 17065 --slave /usr/share/man/man1/rmid.1 rmid.1 /usr/java/jre1.7.0_06/man/man1/rmid.1 | ||
+ | alternatives --install /usr/bin/rmiregistry rmiregistry /usr/java/jre1.7.0_06/bin/rmiregistry 17065 --slave /usr/share/man/man1/rmiregistry.1 rmiregistry.1 /usr/java/jre1.7.0_06/man/man1/rmiregistry.1 | ||
+ | alternatives --install /usr/bin/servertool servertool /usr/java/jre1.7.0_06/bin/servertool 17065 --slave /usr/share/man/man1/servertool.1 servertool.1 /usr/java/jre1.7.0_06/man/man1/servertool.1 | ||
+ | alternatives --install /usr/bin/tnameserv tnameserv /usr/java/jre1.7.0_06/bin/tnameserv 17065 --slave /usr/share/man/man1/tnameserv.1 tnameserv.1 /usr/java/jre1.7.0_06/man/man1/tnameserv.1 | ||
+ | alternatives --install /usr/bin/unpack200 unpack200 /usr/java/jre1.7.0_06/bin/unpack200 17065 --slave /usr/share/man/man1/unpack200.1 unpack200.1 /usr/java/jre1.7.0_06/man/man1/unpack200.1 | ||
+ | 9. Export JAVA_HOME | ||
+ | export JAVA_HOME="/usr/java/jre1.7.0_06" | ||
'''If you need JDK instead of JRE, then you have to do something very similar.''' | '''If you need JDK instead of JRE, then you have to do something very similar.''' |
Revision as of 13:45, 27 August 2012
Due to the fact that package get-jre7-oracle was removed from ABF because of Oracle licensing policy ROSA users now have to download and install Oracle Java packages from the official Oracle site.
This HOWTO is based on original RH tutorial awailble on this link: http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-7-on-fedora-centos-red-hat-rhel/
You can download the official Oracle Java RPMs from http://www.oracle.com/technetwork/java/javase/downloads/index.html . You can also use tar.gz packages from same place.
If you can install appropriate RPM package (jdk-7u6-linux-i586.rpm, jdk-7u6-linux-x64.rpm, jre-7u6-linux-i586.rpm or jre-7u6-linux-x64.rpm), you can skip steps from 1 to 6, but steps from 7 to the end have to be done even in that case.
If you use RPMs, be prepared that you will get error like this after install
installing jre-7u6-linux-x64.rpm Preparing... ##################################################################################################### 1/1: jre ##################################################################################################### Unpacking JAR files... rt.jar... Error: Could not open input file: /usr/java/jre1.7.0_06/lib/rt.pack jsse.jar... Error: Could not open input file: /usr/java/jre1.7.0_06/lib/jsse.pack charsets.jar... Error: Could not open input file: /usr/java/jre1.7.0_06/lib/charsets.pack localedata.jar... Error: Could not open input file: /usr/java/jre1.7.0_06/lib/ext/localedata.pack
Just ignore that message, and skip steps 4 to 6.
If you use tar.gz packages, just skip step R4 (RPM installation).
Everything else is same in both cases.
Contents
JRE 7u6 64bit
1. Download jre-7u6-linux-x64.tar.gz from
http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1637588.html
2. Type
su -
and provide root passwrod
3. Go to /home/<your username>/Downloads or whatever folder you've downloaded the package to
4. Remove JRE 7u6 and links named latest and default
rm -rf /usr/java/jre1.7.0_06 rm -f /usr/java/latest rm -f /usr/java/default
5. Extract package to appropriate folder
tar -xzf jre-7u6-linux-x64.tar.gz -C /usr/java/ --no-same-owner
6. Make symbolic links for latest and default
ln -sf ./jre1.7.0_06 /usr/java/latest ln -sf ./latest /usr/java/default
R4. Install RPM package
urpmi jre-7u6-linux-x64.rpm
7. Install Browser Plugins
alternatives --install /usr/lib64/xulrunner-5.0/plugins/libjavaplugin.so xulrunner-1.9-javaplugin.so /usr/java/jre1.7.0_06/lib/amd64/libnpjp2.so 17065 alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /usr/java/jre1.7.0_06/lib/amd64/libnpjp2.so 17065
8. Install JRE and man pages
alternatives --install /usr/bin/ControlPanel ControlPanel /usr/java/jre1.7.0_06/bin/ControlPanel 17065 alternatives --install /usr/bin/java java /usr/java/jre1.7.0_06/bin/java 17065 --slave /usr/share/man/man1/java.1 java.1 /usr/java/jre1.7.0_06/man/man1/java.1 alternatives --install /usr/bin/java_vm java_vm /usr/java/jre1.7.0_06/bin/java_vm 17065 alternatives --install /usr/bin/javaws javaws /usr/java/jre1.7.0_06/bin/javaws 17065 --slave /usr/share/man/man1/javaws.1 javaws.1 /usr/java/jre1.7.0_06/man/ma n1/javaws.1 alternatives --install /usr/bin/jcontrol jcontrol /usr/java/jre1.7.0_06/bin/jcontrol 17065 alternatives --install /usr/bin/keytool keytool /usr/java/jre1.7.0_06/bin/keytool 17065 --slave /usr/share/man/man1/keytool.1 keytool.1 /usr/java/jre1.7.0_06/man/man1/keytool.1 alternatives --install /usr/bin/orbd orbd /usr/java/jre1.7.0_06/bin/orbd 17065 --slave /usr/share/man/man1/orbd.1 orbd.1 /usr/java/jre1.7.0_06/man/man1/orbd.1 alternatives --install /usr/bin/pack200 pack200 /usr/java/jre1.7.0_06/bin/pack200 17065 --slave /usr/share/man/man1/pack200.1 pack200.1 /usr/java/jre1.7.0_06/man/man1/pack200.1 alternatives --install /usr/bin/policytool policytool /usr/java/jre1.7.0_06/bin/policytool 17065 --slave /usr/share/man/man1/policytool.1 policytool.1 /usr/java/jre1.7.0_06/man/man1/policytool.1 alternatives --install /usr/bin/rmid rmid /usr/java/jre1.7.0_06/bin/rmid 17065 --slave /usr/share/man/man1/rmid.1 rmid.1 /usr/java/jre1.7.0_06/man/man1/rmid.1 alternatives --install /usr/bin/rmiregistry rmiregistry /usr/java/jre1.7.0_06/bin/rmiregistry 17065 --slave /usr/share/man/man1/rmiregistry.1 rmiregistry.1 /usr/java/jre1.7.0_06/man/man1/rmiregistry.1 alternatives --install /usr/bin/servertool servertool /usr/java/jre1.7.0_06/bin/servertool 17065 --slave /usr/share/man/man1/servertool.1 servertool.1 /usr/java/jre1.7.0_06/man/man1/servertool.1 alternatives --install /usr/bin/tnameserv tnameserv /usr/java/jre1.7.0_06/bin/tnameserv 17065 --slave /usr/share/man/man1/tnameserv.1 tnameserv.1 /usr/java/jre1.7.0_06/man/man1/tnameserv.1 alternatives --install /usr/bin/unpack200 unpack200 /usr/java/jre1.7.0_06/bin/unpack200 17065 --slave /usr/share/man/man1/unpack200.1 unpack200.1 /usr/java/jre1.7.0_06/man/man1/unpack200.1
9. Export JAVA_HOME
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/lib/amd64/libnpjp2.so 20000
JRE 7u6 32bit
1. Download jre-7u6-linux-i586.tar.gz from http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1637588.html
2. Type
su -
and provide root password 3. Go to /home/<your username>/Downloads
4. Remove JRE 7u6 and links named latest and default
rm -rf /usr/java/jre1.7.0_06 rm -f /usr/java/latest rm -f /usr/java/default
5. Extract package to appropriate folder
tar -xzf jre-7u6-linux-i586.tar.gz -C /usr/java/ --no-same-owner
6. Make symbolic links for latest and default
ln -sf ./jre1.7.0_06 /usr/java/latest ln -sf ./latest /usr/java/default
R4. Install RPM package
urpmi jre-7u6-linux-i586.rpm
7. Install Browser Plugins
alternatives --install /usr/lib/xulrunner-5.0/plugins/libjavaplugin.so xulrunner-1.9-javaplugin.so /usr/java/jre1.7.0_06/lib/i386/libnpjp2.so 17065 alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /usr/java/jre1.7.0_06/lib/i386/libnpjp2.so 17065
8. Install JRE and man pages
alternatives --install /usr/bin/ControlPanel ControlPanel /usr/java/jre1.7.0_06/bin/ControlPanel 17065 alternatives --install /usr/bin/java java /usr/java/jre1.7.0_06/bin/java 17065 --slave /usr/share/man/man1/java.1 java.1 /usr/java/jre1.7.0_06/man/man1/java.1 alternatives --install /usr/bin/java_vm java_vm /usr/java/jre1.7.0_06/bin/java_vm 17065 alternatives --install /usr/bin/javaws javaws /usr/java/jre1.7.0_06/bin/javaws 17065 --slave /usr/share/man/man1/javaws.1 javaws.1 /usr/java/jre1.7.0_06/man/man1/javaws.1 alternatives --install /usr/bin/jcontrol jcontrol /usr/java/jre1.7.0_06/bin/jcontrol 17065 alternatives --install /usr/bin/keytool keytool /usr/java/jre1.7.0_06/bin/keytool 17065 --slave /usr/share/man/man1/keytool.1 keytool.1 /usr/java/jre1.7.0_06/man/man1/keytool.1 alternatives --install /usr/bin/orbd orbd /usr/java/jre1.7.0_06/bin/orbd 17065 --slave /usr/share/man/man1/orbd.1 orbd.1 /usr/java/jre1.7.0_06/man/man1/orbd.1 alternatives --install /usr/bin/pack200 pack200 /usr/java/jre1.7.0_06/bin/pack200 17065 --slave /usr/share/man/man1/pack200.1 pack200.1 /usr/java/jre1.7.0_06/man/man1/pack200.1 alternatives --install /usr/bin/policytool policytool /usr/java/jre1.7.0_06/bin/policytool 17065 --slave /usr/share/man/man1/policytool.1 policytool.1 /usr/java/jre1.7.0_06/man/man1/policytool.1 alternatives --install /usr/bin/rmid rmid /usr/java/jre1.7.0_06/bin/rmid 17065 --slave /usr/share/man/man1/rmid.1 rmid.1 /usr/java/jre1.7.0_06/man/man1/rmid.1 alternatives --install /usr/bin/rmiregistry rmiregistry /usr/java/jre1.7.0_06/bin/rmiregistry 17065 --slave /usr/share/man/man1/rmiregistry.1 rmiregistry.1 /usr/java/jre1.7.0_06/man/man1/rmiregistry.1 alternatives --install /usr/bin/servertool servertool /usr/java/jre1.7.0_06/bin/servertool 17065 --slave /usr/share/man/man1/servertool.1 servertool.1 /usr/java/jre1.7.0_06/man/man1/servertool.1 alternatives --install /usr/bin/tnameserv tnameserv /usr/java/jre1.7.0_06/bin/tnameserv 17065 --slave /usr/share/man/man1/tnameserv.1 tnameserv.1 /usr/java/jre1.7.0_06/man/man1/tnameserv.1 alternatives --install /usr/bin/unpack200 unpack200 /usr/java/jre1.7.0_06/bin/unpack200 17065 --slave /usr/share/man/man1/unpack200.1 unpack200.1 /usr/java/jre1.7.0_06/man/man1/unpack200.1
9. Export JAVA_HOME
export JAVA_HOME="/usr/java/jre1.7.0_06"
If you need JDK instead of JRE, then you have to do something very similar.
JDK 7u6 64bit
1. Download jdk-7u6-linux-x64.tar.gz from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html
2. Type
su -
and provide root passwrod
3. Go to /home/<your username>/Downloads or whatever folder you've downloaded the package to
4. Remove JRE 7u6 and links named latest and default
rm -rf /usr/java/jdk1.7.0_06 rm -f /usr/java/latest rm -f /usr/java/default
5. Extract package to appropriate folder
tar -xzf jdk-7u6-linux-x64.tar.gz -C /usr/java/ --no-same-owner
6. Make symbolic links for latest and default
ln -sf ./jdk1.7.0_06 /usr/java/latest ln -sf ./latest /usr/java/default
7. Install Java
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
8. Install JavaWS
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000
9. Install Browser (Mozilla) Plugin
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 20000
10. Install javac and jar
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000 alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000
11. Export JAVA_HOME
export JAVA_HOME="/usr/java/latest"
JDK 7u6 32bit
1. Download jdk-7u6-linux-i586.tar.gz from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html
2. Type
su -
and provide root passwrod
3. Go to /home/<your username>/Downloads or whatever folder you've downloaded the package to
4. Remove JRE 7u6 and links named latest and default
rm -rf /usr/java/jdk1.7.0_06 rm -f /usr/java/latest rm -f /usr/java/default
5. Extract package to appropriate folder
tar -xzf jdk-7u6-linux-i586.tar.gz -C /usr/java/ --no-same-owner
6. Make symbolic links for latest and default
ln -sf ./jdk1.7.0_06 /usr/java/latest ln -sf ./latest /usr/java/default
7. Install Java
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
8. Install JavaWS
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000
9. Install Browser (Mozilla) Plugin
alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/latest/jre/lib/i386/libnpjp2.so 20000
10. Install javac and jar
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000 alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000
11. Export JAVA_HOME
export JAVA_HOME="/usr/java/latest"
Checking Java installation
You can check current java, javac, javaws and libjavaplugin.so versions like this:
java -version javaws
And if you installed JDK
javac -version
Open http://www.java.com/en/download/installed.jsp in your browser.