Hi All,
I've read all the tips above, but the below simple way worked me. (OpenSUSE 13.2).
Simply downloaded the Oracle Java 1.8 package "java-1_8_0-sun" from OpenSUSE repo , the RPM version and installed normally:
Code:
tools1:~ # rpm -ivh /root/install/java-1_8_0-sun-1.8.92-18.1.x86_64.rpm
warning: /root/install/java-1_8_0-sun-1.8.92-18.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID b1c20679: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:java-1_8_0-sun-1.8.92-18.1 ################################# [100%]
update-alternatives: error: alternative javaws can't be slave of java: it is a slave of javaplugin
update-alternatives: using /usr/lib64/jvm/jre-1.8.0-sun to provide /usr/lib64/jvm/jre-sun (jre_sun) in auto mode
update-alternatives: using /usr/lib64/jvm-private/java-1_8_0-sun/jce/vanilla/local_policy.jar to provide /usr/lib64/jvm/jre-1.8.0-sun/lib/security/local_policy.jar (jce_1.8.0_sun_local_policy) in auto mode
tools1:~ #
I then ignored the error message from update-alternatives, it's just a conflict about OpenJDK and Oracle Java.
Instead added Oracle java to the update-alternatives manually:
Code:
tools1:~ # update-alternatives --install /usr/bin/java java /usr/lib64/jvm/jre-1.8.0-sun/bin/java 20000
update-alternatives: using /usr/lib64/jvm/jre-1.8.0-sun/bin/java to provide /usr/bin/java (java) in auto mode
tools1:~ #
Done.
List of java's:
Code:
tools1:~ # update-alternatives --list java
/usr/lib64/jvm/jre-1.7.0-openjdk/bin/java
/usr/lib64/jvm/jre-1.8.0-openjdk/bin/java
/usr/lib64/jvm/jre-1.8.0-sun/bin/java
tools1:~ #
tools1:~ # update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib64/jvm/jre-1.8.0-sun/bin/java 20000 auto mode
1 /usr/lib64/jvm/jre-1.7.0-openjdk/bin/java 1705 manual mode
2 /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java 1805 manual mode
3 /usr/lib64/jvm/jre-1.8.0-sun/bin/java 20000 manual mode
Press enter to keep the current choice[*], or type selection number: 0
tools1:~ #
The Oracle Java is started with java command:
Code:
tools1:~ # java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
tools1:~ #
Hope it helps.
Bookmarks