Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 31

Thread: Unable to install Oracle Java 8 OpenSUSE 13.2

  1. #21
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,471
    Blog Entries
    2

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Quote Originally Posted by GofBorg View Post

    Returns:
    update-alternatives: error: alternative javaws can't be slave of java: it is a slave of javaplugin

    Next run: update-alternatives --config java

    Returns:

    There are 2 choices for the alternative java (providing /usr/bin/java).


    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/lib/jvm/jre-1.8.0-openjdk/bin/java 18040 auto mode
    1 /usr/lib/jvm/jre-1.7.0-openjdk/bin/java 17147 manual mode
    2 /usr/lib/jvm/jre-1.8.0-openjdk/bin/java 18040 manual mode


    Press enter to keep the current choice[*], or type selection number:

    No Oracle/Sun Java choice.

    In the above:
    The javaplugin is available only in the Oracle JDK, not in the Oracle JRE only and not in openJDK.

    As Miuku noted, openjdk needs to be removed.
    Interestingly, I just tested removing openjdk with the following command which seems to remove openjdk but refuses to remove the "headless" packages. If you then go in and remove the headless packages specifically, it leaves the update-alternatives entries intact
    Code:
    zypper rm java
    TSU

  2. #22
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,471
    Blog Entries
    2

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Quote Originally Posted by richardstevenhack View Post
    Don't know if this will help, but while messing around with my Java installation today, I ran into similar problems. I found this set of instructions on some Chinese blog.
    Code:
    Download unzip JDK 7, giving 777 permission to use update-alternatives to manage multiple JDK:
    sudo zypper install update-alternatives
    sudo /usr/sbin/update-alternatives --install /usr/bin/java java /home/li/jdk1.7.0/bin/java 1065
    sudo /usr/sbin/update-alternatives --install /usr/bin/javac javac /home/li/jdk1.7.0/bin/javac 1065
    sudo /usr/sbin/ update-alternatives --install /usr/bin/jar jar /home/li/jdk1.7.0/bin/jar 1065
    sudo /usr/sbin/update-alternatives --install /usr/bin/ javaws javaws /home/li/jdk1.7.0/bin/javaws 1065
    
    Set the default JDK, enter a number to select:
    sudo /usr/sbin/update-alternatives --config java
    sudo /usr/sbin/update-alternatives --config javac
    
    Set the environment variable:
    vi ~/.bashrc
    In the penultimate line to:
    export JAVA_HOME=/home/li/jdk1.7.0
    
    Save and then run:
    source ~/.bashrc
    I was installing just JRE so I didn't need the javac, jar and javaws commands. I altered the commands to point to the appropriate locations where I had Java installed.

    However, I still had some issues due to the non-standard location of my install, so I ended up dumping it and downloaded the one here:
    http://software.opensuse.org/package/java-1_8_0-sun

    which seemed to handle the update-alternatives business. But I still had to set up the $JAVA_HOME and $PATH variables to point to the selected Java install.

    Once I got all that working, my jEdit text editor which is a Java app runs fine from the command line but doesn't run from the KDE menu entry. I've got a post elsewhere on that problem.

    Hope this helps.
    You might find a better approach is to take a look at the scripts I used to install Oracle SE 7 JDK, I purposefully kept the scripts individual for maintenance reasons. Modify the script that contains the instructions for creating and updating "update-alternatives" for your own use.
    https://github.com/putztzu/openSUSE_Oracle_Java_Install

    Also, AFAIK you shouldn't need to enter your JAVA environment variables elsewhere, it should be specified in update-alternatives as best practice.

    As for your JEdit issue (don't know where your other post is), the simple way to resolve is to find another Java app installed in KDE (or install one) to provide a template for how to do so correctly. So, I don't know if it would work in KDE but I posted how to do this for LXDE (and likely works for XFCE). Note the commands and required flags...
    https://en.opensuse.org/User:Tsu2/LXDE-Main_Menu


    TSU

  3. #23
    Join Date
    Oct 2010
    Location
    Mountains of Palencia
    Posts
    135

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    I am having trouble with Oracle Java on 13.2. I much prefer openJDK but my tax authority refuses to work with openJava / IcedTea. Therefore I have installed 8u25, 8u31 and now 8u40 (removing iced tea) using a combination of instructions from the SDB and this thread. Everything was OK up to 8u31 but now I am out of my depth (again ). Here is present situation:

    Code:
    linux:/ # rpm -ql $(rpm -qa | grep jre) | grep libnpjp2.so
    /usr/java/jre1.8.0_25/lib/amd64/libnpjp2.so
    /usr/java/jre1.8.0_31/lib/amd64/libnpjp2.so
    
    linux:/ # java -version
    java version "1.8.0_31"
    Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
    I am using FF but the plugins show only 8u31. Installation of the latest version (8u40) generated the error message reported by others. I therefore switched to the .tar generic version. It appears to be properly installed but not recognized. Should I use the Java web site instructions to remove the old versions and rerun the symlink command?
    Last edited by pacolaser; 19-Mar-2015 at 15:33. Reason: Error in CODE
    Lenovo IdeaPad,Y510p. openSUSE LEAP 42.3 (x86_64). KDE. Intel i7, 16GB RAM, 1TB SSD/HD drive. NVIDIA GT755M 2GB (not installed yet).

  4. #24

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    I got the same message but was able to install with the following method.

    As root, run the following command to create an alias for the redhat command to the Suse command:

    Code:
    ln -s /usr/sbin/update-alternatives  /usr/sbin/alternatives
    Run the following command to install the rpm without checking for dependencies (use the correct filename if you are installing the jre):

    Code:
    rpm -i --nodeps jdk-8u40-linux-i586.rpm
    I see this has been reported as a bug and is marked "resolved, incomplete" ... not sure what that means.... https://bugs.openjdk.java.net/browse/JDK-8075409

  5. #25
    Join Date
    Oct 2010
    Location
    Mountains of Palencia
    Posts
    135

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Quote Originally Posted by dvcroft View Post
    I got the same message but was able to install with the following method.

    As root, run the following command to create an alias for the redhat command to the Suse command:

    Code:
    ln -s /usr/sbin/update-alternatives  /usr/sbin/alternatives
    Run the following command to install the rpm without checking for dependencies (use the correct filename if you are installing the jre):

    Code:
    rpm -i --nodeps jdk-8u40-linux-i586.rpm
    Thanks DVCROFT. This worked for me. I made the adjustment for jdk/jre and i586/x64. The second command complained but I now have 8u40 and it shows up in FF. So SOLVED!
    Lenovo IdeaPad,Y510p. openSUSE LEAP 42.3 (x86_64). KDE. Intel i7, 16GB RAM, 1TB SSD/HD drive. NVIDIA GT755M 2GB (not installed yet).

  6. #26

    Thumbs up Re: Unable to install Oracle Java 8 OpenSUSE 13.2 (Solved)

    Quote Originally Posted by nbreuer View Post
    Here is how I just installed 8u40 on 13.2:
    1. Don't use the rpm but the tgz (jre-8u40-linux-x64.tar.gz) and untar it, e.g. to /usr/java (creates /usr/java/jre1.8.0_40/)
    2. Apply the std update-alternatives procedure, i.e.
      /usr/sbin/update-alternatives --install "/usr/bin/java" "java" "/usr/java/jre1.8.0_40/bin/java" 40
      /usr/sbin/update-alternatives --install "/usr/lib/browser-plugins/javaplugin.so" "javaplugin" "/usr/java/jre1.8.0_40/lib/amd64/libnpjp2.so" 40
      /usr/sbin/update-alternatives --config java
      /usr/sbin/update-alternatives --config javaplugin
    3. Finally, update symlink to plugin in appropriate user dir:
      cd .mozilla/plugins/
      rm libnpjp2.so
      ln -s /usr/java/jre1.8.0_40/lib/amd64/libnpjp2.so libnpjp2.so

    Worked fine for me.
    Regards Nick
    Works GREAT!! Thank you..!! - Merci beaucoup..!! - Ngibona kakhulu..!!

    André
    https://plus.google.com/111310545842863442992

  7. #27

    Smile Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Quote Originally Posted by GofBorg View Post
    I have already tried this without success.

    I tried that but it did not work as well. Then I tried running rpm with --nodeps option, which generated the expected errors related to the missing "alternatives" binary but installed the files. Then I ran:

    update-alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_45/bin/java 20000

    And now Java 8 is working fine on Opensuse 13.2.


    Marco Aurelio Freiberger Monteiro

  8. #28

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Quote Originally Posted by mafmonteiro666 View Post
    I tried that but it did not work as well. Then I tried running rpm with --nodeps option, which generated the expected errors related to the missing "alternatives" binary but installed the files. Then I ran:

    update-alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_45/bin/java 20000

    And now Java 8 is working fine on Opensuse 13.2.


    Marco Aurelio Freiberger Monteiro
    Another simple solution is this: http://software.opensuse.org/package/alternatives
    Works fine here on OpenSuSE 13.2/x86_64

    Greez
    PhilMan

  9. #29
    Join Date
    Dec 2008
    Location
    Norway
    Posts
    550

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    Creating the symlink /usr/sbin/alternatives from /usr/sbin/update-alternatives does work. However it is a manually operation that needs to be done on all installs of the Oracle Java. We have the Oracle JDK/JRE in our yum repository which is installed on all servers we assemble. Having to maintain this symlink within an install script is not a good solution. It is a hack. Would it not be better to repackage the RPM for use on SUSE? We did not have this problem with Java 7, only with Java 8.

    Why does SUSE have update-alternatives, while Fedora/Redhat have just alternatives? They are both an RPM-based distro.

  10. #30

    Default Re: Unable to install Oracle Java 8 OpenSUSE 13.2

    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.

Page 3 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •