Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Installation of Java (Oracle)

  1. #1
    Join Date
    Dec 2015
    Posts
    47

    Default Installation of Java (Oracle)

    Hi,


    I'm trying to install Java SE Development Kit 8u71 from here.

    I also read this, this, this, and this (posts about installing Java).


    So, this is my status:
    I have the 'jdk-8u71-linux-x64.rpm', I want to install it with:

    Code:
    marc@TheD:~/Downloads> sudo rpm -ivh --nodeps jdk-8u71-linux-x64.rpm
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:jdk1.8.0_71-2000:1.8.0_71-fcs    ################################# [100%]
    Unpacking JAR files...
            tools.jar...
            plugin.jar...
            javaws.jar...
            deploy.jar...
            rt.jar...
            jsse.jar...
            charsets.jar...
            localedata.jar...
            jfxrt.jar...
    update-alternatives: using /usr/java/jdk1.8.0_71/jre/bin/java to provide /usr/bin/java (java) in auto mode
    update-alternatives: error: alternative ControlPanel can't be slave of javac: it is a slave of java
    warning: %post(jdk1.8.0_71-2000:1.8.0_71-fcs.x86_64) scriptlet failed, exit status 2

    That doesn't work because I still have the openJDK installed.

    I already removed most of it but I am stuck with 'java-1_8_0-openjdk' and 'java-1_8_0-openjdk'.

    I am trying to remove these 2 packages as well (in Yast) but Yast keeps installing the 1_7_0 version simultaneously.
    I don't know how to stop that.



    For why I don't use openJDK: I try to get rJava (R) running and it has a problem with the compiler. Turns out openJDK sometimes has issues, they say oracle compiler is better.




    Best
    Marc

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,069
    Blog Entries
    2

    Default Re: Installation of Java (Oracle)

    Try this relatively new contribution
    https://forums.opensuse.org/showthre...atives-on-Leap

    If it works, or if you have problems following the steps, post back here.

    TSU

  3. #3
    Join Date
    Dec 2015
    Posts
    47

    Default Re: Installation of Java (Oracle)

    Quote Originally Posted by tsu2 View Post
    Try this relatively new contribution
    https://forums.opensuse.org/showthre...atives-on-Leap

    If it works, or if you have problems following the steps, post back here.

    TSU

    Hi,

    thanks for the quick reply.


    I'm a bit confused.
    Doesn't that thread explain what has to be done after the installation?

    In my case the installation already fails, doesn't it?


    Best
    Marc

  4. #4
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Installation of Java (Oracle)

    I think you have a few things mixed up, installing Oracle's jre does not remove openjdk, actually there was a bug in oracle's rpm that didn't state that Oracle provided java so removing openjdk will remove any application that depends on java, the thing to do is install Oracle's jre and then use tsu2's link to set it as the default java vm, do not try to remove openjdk as that will cause a lot of other issues just use update-alternatives according to this thread
    https://forums.opensuse.org/showthre...atives-on-Leap

    edit
    maybe
    Code:
    sudo rpm -ivh --nodeps jdk-8u71-linux-x64.rpm
    is not the best way to install an rpm try using zypper as Oracle's jre might need other packages, do
    Code:
    sudo zypper in jdk-8u71-linux-x64.rpm

  5. #5
    Join Date
    Dec 2015
    Posts
    47

    Default Re: Installation of Java (Oracle)

    Quote Originally Posted by I_A View Post
    I think you have a few things mixed up, installing Oracle's jre does not remove openjdk, actually there was a bug in oracle's rpm that didn't state that Oracle provided java so removing openjdk will remove any application that depends on java, the thing to do is install Oracle's jre and then use tsu2's link to set it as the default java vm, do not try to remove openjdk as that will cause a lot of other issues just use update-alternatives according to this thread
    https://forums.opensuse.org/showthre...atives-on-Leap

    edit
    maybe
    Code:
    sudo rpm -ivh --nodeps jdk-8u71-linux-x64.rpm
    is not the best way to install an rpm try using zypper as Oracle's jre might need other packages, do
    Code:
    sudo zypper in jdk-8u71-linux-x64.rpm
    I get what you mean. I need to create all these links after installing oracle java so that I can actually choose it as default.

    However, I don't even get to install it.

    the zypper command gives the exact same error:

    Code:
    marc@TheD:~/Downloads> sudo zypper in jdk-8u71-linux-x64.rpm                                
    Daten des Repositories laden ...                                                                       
    Installierte Pakete lesen ...                                                                          
    Paketabhängigkeiten auflösen ...                                                                       
                                                                                                           
    Das folgende NEUE Paket wird installiert:                                                              
      jdk1.8.0_71                                                                                          
                                                                                                           
    1 neues Paket zu installieren.                                                                         
    Overall download size: 152,7 MiB. Already cached: 0 B. Nach der Operation werden zusätzlich 255,4 MiB  
    belegt.                                                                                                
    Fortfahren? [j/n/? zeigt alle Optionen] (j): j
    Paket jdk1.8.0_71-2000:1.8.0_71-fcs.x86_64 wird abgerufen         (1/1), 152,7 MiB (255,4 MiB entpackt)
    Test auf Dateikonflikte: ......................................................................[fertig]
    (1/1) Installation von: jdk1.8.0_71-2000:1.8.0_71-fcs .........................................[fertig]
    Zusätzliche RPM-Ausgabe:                                                                               
    Unpacking JAR files...                                                                                 
            tools.jar...                                                                                   
            plugin.jar...                                                                                  
            javaws.jar...                                                                                  
            deploy.jar...                                                                                  
            rt.jar...                                                                                      
            jsse.jar...
            charsets.jar...
            localedata.jar...
            jfxrt.jar...
    update-alternatives: using /usr/java/jdk1.8.0_71/jre/bin/java to provide /usr/bin/java (java) in auto mode
    update-alternatives: error: alternative ControlPanel can't be slave of javac: it is a slave of java
    warning: %post(jdk1.8.0_71-2000:1.8.0_71-fcs.x86_64) scriptlet failed, exit status 2

  6. #6
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Installation of Java (Oracle)

    what error?
    according to google translate you installed jre but update-alternatives couldn't set it as the default runtime that's where the how-to from the above link comes handy, you'd need to make a new script and execute it as root reread the howto
    just a quck note the howto is for jre 8u66 you have 8u71 so you;d need to change the path /usr/java/jre1.8.0_66 to /usr/java/jre.8.0_71 or similar see where the jre has actually ended up

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,069
    Blog Entries
    2

    Default Re: Installation of Java (Oracle)

    The reference I provided says (yes, it's hidden in there) to install Oracle SE 8 JDK (not JRE). The JDK includes the JRE but also provides the additional Developer applets.
    It doesn't say whether it should be installed using the TAR or RPM, but for now my educated guess is the RPM which would install files in a known location and would be essential for the scripts setting update-alternatives.

    Be aware that historically, installing Oracle Java packages using the TAR file has stomped all over previous Java.

    TSU

  8. #8
    Join Date
    Dec 2015
    Posts
    47

    Default Re: Installation of Java (Oracle)

    Quote Originally Posted by I_A View Post
    what error?
    according to google translate you installed jre but update-alternatives couldn't set it as the default runtime that's where the how-to from the above link comes handy, you'd need to make a new script and execute it as root reread the howto
    just a quck note the howto is for jre 8u66 you have 8u71 so you;d need to change the path /usr/java/jre1.8.0_66 to /usr/java/jre.8.0_71 or similar see where the jre has actually ended up
    It unpacks a few jars. Then the fail is here:

    Code:
    update-alternatives: using /usr/java/jdk1.8.0_71/jre/bin/java to provide /usr/bin/java (java) in auto mode update-alternatives: error: alternative ControlPanel can't be slave of javac: it is a slave of java warning: %post(jdk1.8.0_71-2000:1.8.0_71-fcs.x86_64) scriptlet failed, exit status 2

    I would interpret this as: while unpacking there is already an issue which stops the installation process.


    Now, just to be sure I ran the 2 mentioned scripts. I just change the pattern "0_66" to "0_71" in the scripts (the jdk version I downloaded).

    The first one gave me:

    Code:
    marc@TheD:~/Downloads> sudo ./setting-up-sun-jdk_1.sh
    update-alternatives: warning: forcing reinstallation of alternative /usr/java/jdk1.8.0_71/jre/bin/java because link group java is broken
    update-alternatives: warning: skip creation of /usr/share/man/man1/java.1 because associated file /usr/java/jdk1.8.0_71/man/man1/java.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/keytool.1 because associated file /usr/java/jdk1.8.0_71/man/man1/keytool.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/orbd.1 because associated file /usr/java/jdk1.8.0_71/man/man1/orbd.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/policytool.1 because associated file /usr/java/jdk1.8.0_71/man/man1/policytool.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/rmid.1 because associated file /usr/java/jdk1.8.0_71/man/man1/rmid.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/rmiregistry.1 because associated file /usr/java/jdk1.8.0_71/man/man1/rmiregistry.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/servertool.1 because associated file /usr/java/jdk1.8.0_71/man/man1/servertool.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/tnameserv.1 because associated file /usr/java/jdk1.8.0_71/man/man1/tnameserv.1 (of link group java) doesn't exist
    The second one gave me:

    Code:
    marc@TheD:~/Downloads> sudo ./setting-up-sun-jdk_2.sh
    update-alternatives: error: alternative pack200 can't be slave of javac: it is a slave of java

    Just to finish all mentioned steps, here is update-alternatives:

    Code:
    marc@TheD:~/Downloads> sudo update-alternatives --display java
    java - auto mode
      link currently points to /usr/java/jdk1.8.0_71/jre/bin/java
    /usr/java/jdk1.8.0_71/jre/bin/java - priority 18071
      slave ControlPanel: /usr/java/jdk1.8.0_71/jre/bin/ControlPanel
      slave java.1: /usr/java/jdk1.8.0_71/man/man1/java.1
      slave javaws: /usr/java/jdk1.8.0_71/jre/bin/javaws
      slave javaws.1: /usr/java/jdk1.8.0_71/man/man1/javaws.1
      slave jcontrol: /usr/java/jdk1.8.0_71/jre/bin/jcontrol
      slave jjs: /usr/java/jdk1.8.0_71/jre/bin/jjs
      slave jjs.1: /usr/java/jdk1.8.0_71/man/man1/jjs.1
      slave keytool: /usr/java/jdk1.8.0_71/jre/bin/keytool
      slave keytool.1: /usr/java/jdk1.8.0_71/man/man1/keytool.1
      slave orbd: /usr/java/jdk1.8.0_71/jre/bin/orbd
      slave orbd.1: /usr/java/jdk1.8.0_71/man/man1/orbd.1
      slave pack200: /usr/java/jdk1.8.0_71/jre/bin/pack200
      slave pack200.1: /usr/java/jdk1.8.0_71/man/man1/pack200.1
      slave policytool: /usr/java/jdk1.8.0_71/jre/bin/policytool
      slave policytool.1: /usr/java/jdk1.8.0_71/man/man1/policytool.1
      slave rmid: /usr/java/jdk1.8.0_71/jre/bin/rmid
      slave rmid.1: /usr/java/jdk1.8.0_71/man/man1/rmid.1
      slave rmiregistry: /usr/java/jdk1.8.0_71/jre/bin/rmiregistry
      slave rmiregistry.1: /usr/java/jdk1.8.0_71/man/man1/rmiregistry.1
      slave servertool: /usr/java/jdk1.8.0_71/jre/bin/servertool
      slave servertool.1: /usr/java/jdk1.8.0_71/man/man1/servertool.1
      slave tnameserv: /usr/java/jdk1.8.0_71/jre/bin/tnameserv
      slave tnameserv.1: /usr/java/jdk1.8.0_71/man/man1/tnameserv.1
      slave unpack200: /usr/java/jdk1.8.0_71/jre/bin/unpack200
      slave unpack200.1: /usr/java/jdk1.8.0_71/man/man1/unpack200.1
    /usr/lib64/jdk_Oracle/bin/java - priority 3
      slave java.1.gz: /usr/lib64/jdk_Oracle/man/man1/java.1.gz
      slave jre: /usr/lib64/jdk_Oracle/jre
      slave jre_exports: /usr/lib64/jvm-exports/jdk_Oracle
      slave keytool: /usr/lib64/jdk_Oracle/bin/keytool
      slave keytool.1.gz: /usr/lib64/jdk_Oracle/man/man1/keytool.1.gz
      slave orbd: /usr/lib64/jdk_Oracle/bin/orbd
      slave orbd.1.gz: /usr/lib64/jdk_Oracle/man/man1/orbd.1.gz
      slave policytool: /usr/lib64/jdk_Oracle/bin/policytool
      slave policytool.1.gz: /usr/lib64/jdk_Oracle/man/man1/policytool.1.gz
      slave rmid: /usr/lib64/jdk_Oracle/bin/rmid
      slave rmid.1.gz: /usr/lib64/jdk_Oracle/man/man1/rmid.1.gz
      slave rmiregistry: /usr/lib64/jdk_Oracle/bin/rmiregistry
      slave rmiregistry.1.gz: /usr/lib64/jdk_Oracle/man/man1/rmiregistry.1.gz
      slave servertool: /usr/lib64/jdk_Oracle/bin/servertool
      slave servertool.1.gz: /usr/lib64/jdk_Oracle/man/man1/servertool.1.gz
      slave tnameserv: /usr/lib64/jdk_Oracle/bin/tnameserv
      slave tnameserv.1.gz: /usr/lib64/jdk_Oracle/man/man1/tnameserv.1.gz
    /usr/lib64/jvm/jre-1.5.0-gcj/bin/java - priority 1500
      slave jre: /usr/lib64/jvm/jre-1.5.0-gcj
      slave jre_exports: /usr/lib64/jvm-exports/jre-1.5.0-gcj
      slave rmiregistry: /usr/lib64/jvm/jre-1.5.0-gcj/bin/rmiregistry
    /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java - priority 1805
      slave java.1.gz: /usr/share/man/man1/java-java-1.8.0-openjdk.1.gz
      slave jre: /usr/lib64/jvm/jre-1.8.0-openjdk
      slave jre_exports: /usr/lib64/jvm-exports/jre-1.8.0-openjdk
      slave keytool: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/keytool
      slave keytool.1.gz: /usr/share/man/man1/keytool-java-1.8.0-openjdk.1.gz
      slave orbd: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/orbd
      slave orbd.1.gz: /usr/share/man/man1/orbd-java-1.8.0-openjdk.1.gz
      slave policytool: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/policytool
      slave policytool.1.gz: /usr/share/man/man1/policytool-java-1.8.0-openjdk.1.gz
      slave policytool.desktop: /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre/lib/desktop/policytool.desktop
      slave rmid: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/rmid
      slave rmid.1.gz: /usr/share/man/man1/rmid-java-1.8.0-openjdk.1.gz
      slave rmiregistry: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/rmiregistry
      slave rmiregistry.1.gz: /usr/share/man/man1/rmiregistry-java-1.8.0-openjdk.1.gz
      slave servertool: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/servertool
      slave servertool.1.gz: /usr/share/man/man1/servertool-java-1.8.0-openjdk.1.gz
      slave tnameserv: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/tnameserv
      slave tnameserv.1.gz: /usr/share/man/man1/tnameserv-java-1.8.0-openjdk.1.gz
    Current 'best' version is '/usr/java/jdk1.8.0_71/jre/bin/java'.

    Then, when I want to choose one alternative:

    Code:
    marc@TheD:~/Downloads> sudo update-alternatives --config java
    root's password:
    There are 4 choices for the alternative java (providing /usr/bin/java).
    
      Selection    Path                                       Priority   Status
    ------------------------------------------------------------
    * 0            /usr/java/jdk1.8.0_71/jre/bin/java          18071     auto mode
      1            /usr/java/jdk1.8.0_71/jre/bin/java          18071     manual mode
      2            /usr/lib64/jdk_Oracle/bin/java              3         manual mode
      3            /usr/lib64/jvm/jre-1.5.0-gcj/bin/java       1500      manual mode
      4            /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java   1805      manual mode
    
    Press enter to keep the current choice[*], or type selection number: 2
    update-alternatives: using /usr/lib64/jdk_Oracle/bin/java to provide /usr/bin/java (java) in manual mode

    I mean, I can choose jdk_Oracle now, so thanks very much.

    But is the installation supposed to have all these warnings?
    I guess something goes wrong right?



    Best
    Marc

  9. #9
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Installation of Java (Oracle)

    Quote Originally Posted by mrc View Post
    It unpacks a few jars. Then the fail is here:

    Code:
    update-alternatives: using /usr/java/jdk1.8.0_71/jre/bin/java to provide /usr/bin/java (java) in auto mode update-alternatives: error: alternative ControlPanel can't be slave of javac: it is a slave of java warning: %post(jdk1.8.0_71-2000:1.8.0_71-fcs.x86_64) scriptlet failed, exit status 2

    I would interpret this as: while unpacking there is already an issue which stops the installation process.


    Now, just to be sure I ran the 2 mentioned scripts. I just change the pattern "0_66" to "0_71" in the scripts (the jdk version I downloaded).

    The first one gave me:

    Code:
    marc@TheD:~/Downloads> sudo ./setting-up-sun-jdk_1.sh
    update-alternatives: warning: forcing reinstallation of alternative /usr/java/jdk1.8.0_71/jre/bin/java because link group java is broken
    update-alternatives: warning: skip creation of /usr/share/man/man1/java.1 because associated file /usr/java/jdk1.8.0_71/man/man1/java.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/keytool.1 because associated file /usr/java/jdk1.8.0_71/man/man1/keytool.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/orbd.1 because associated file /usr/java/jdk1.8.0_71/man/man1/orbd.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/policytool.1 because associated file /usr/java/jdk1.8.0_71/man/man1/policytool.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/rmid.1 because associated file /usr/java/jdk1.8.0_71/man/man1/rmid.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/rmiregistry.1 because associated file /usr/java/jdk1.8.0_71/man/man1/rmiregistry.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/servertool.1 because associated file /usr/java/jdk1.8.0_71/man/man1/servertool.1 (of link group java) doesn't exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/tnameserv.1 because associated file /usr/java/jdk1.8.0_71/man/man1/tnameserv.1 (of link group java) doesn't exist
    The second one gave me:

    Code:
    marc@TheD:~/Downloads> sudo ./setting-up-sun-jdk_2.sh
    update-alternatives: error: alternative pack200 can't be slave of javac: it is a slave of java

    Just to finish all mentioned steps, here is update-alternatives:

    Code:
    marc@TheD:~/Downloads> sudo update-alternatives --display java
    java - auto mode
      link currently points to /usr/java/jdk1.8.0_71/jre/bin/java
    /usr/java/jdk1.8.0_71/jre/bin/java - priority 18071
      slave ControlPanel: /usr/java/jdk1.8.0_71/jre/bin/ControlPanel
      slave java.1: /usr/java/jdk1.8.0_71/man/man1/java.1
      slave javaws: /usr/java/jdk1.8.0_71/jre/bin/javaws
      slave javaws.1: /usr/java/jdk1.8.0_71/man/man1/javaws.1
      slave jcontrol: /usr/java/jdk1.8.0_71/jre/bin/jcontrol
      slave jjs: /usr/java/jdk1.8.0_71/jre/bin/jjs
      slave jjs.1: /usr/java/jdk1.8.0_71/man/man1/jjs.1
      slave keytool: /usr/java/jdk1.8.0_71/jre/bin/keytool
      slave keytool.1: /usr/java/jdk1.8.0_71/man/man1/keytool.1
      slave orbd: /usr/java/jdk1.8.0_71/jre/bin/orbd
      slave orbd.1: /usr/java/jdk1.8.0_71/man/man1/orbd.1
      slave pack200: /usr/java/jdk1.8.0_71/jre/bin/pack200
      slave pack200.1: /usr/java/jdk1.8.0_71/man/man1/pack200.1
      slave policytool: /usr/java/jdk1.8.0_71/jre/bin/policytool
      slave policytool.1: /usr/java/jdk1.8.0_71/man/man1/policytool.1
      slave rmid: /usr/java/jdk1.8.0_71/jre/bin/rmid
      slave rmid.1: /usr/java/jdk1.8.0_71/man/man1/rmid.1
      slave rmiregistry: /usr/java/jdk1.8.0_71/jre/bin/rmiregistry
      slave rmiregistry.1: /usr/java/jdk1.8.0_71/man/man1/rmiregistry.1
      slave servertool: /usr/java/jdk1.8.0_71/jre/bin/servertool
      slave servertool.1: /usr/java/jdk1.8.0_71/man/man1/servertool.1
      slave tnameserv: /usr/java/jdk1.8.0_71/jre/bin/tnameserv
      slave tnameserv.1: /usr/java/jdk1.8.0_71/man/man1/tnameserv.1
      slave unpack200: /usr/java/jdk1.8.0_71/jre/bin/unpack200
      slave unpack200.1: /usr/java/jdk1.8.0_71/man/man1/unpack200.1
    /usr/lib64/jdk_Oracle/bin/java - priority 3
      slave java.1.gz: /usr/lib64/jdk_Oracle/man/man1/java.1.gz
      slave jre: /usr/lib64/jdk_Oracle/jre
      slave jre_exports: /usr/lib64/jvm-exports/jdk_Oracle
      slave keytool: /usr/lib64/jdk_Oracle/bin/keytool
      slave keytool.1.gz: /usr/lib64/jdk_Oracle/man/man1/keytool.1.gz
      slave orbd: /usr/lib64/jdk_Oracle/bin/orbd
      slave orbd.1.gz: /usr/lib64/jdk_Oracle/man/man1/orbd.1.gz
      slave policytool: /usr/lib64/jdk_Oracle/bin/policytool
      slave policytool.1.gz: /usr/lib64/jdk_Oracle/man/man1/policytool.1.gz
      slave rmid: /usr/lib64/jdk_Oracle/bin/rmid
      slave rmid.1.gz: /usr/lib64/jdk_Oracle/man/man1/rmid.1.gz
      slave rmiregistry: /usr/lib64/jdk_Oracle/bin/rmiregistry
      slave rmiregistry.1.gz: /usr/lib64/jdk_Oracle/man/man1/rmiregistry.1.gz
      slave servertool: /usr/lib64/jdk_Oracle/bin/servertool
      slave servertool.1.gz: /usr/lib64/jdk_Oracle/man/man1/servertool.1.gz
      slave tnameserv: /usr/lib64/jdk_Oracle/bin/tnameserv
      slave tnameserv.1.gz: /usr/lib64/jdk_Oracle/man/man1/tnameserv.1.gz
    /usr/lib64/jvm/jre-1.5.0-gcj/bin/java - priority 1500
      slave jre: /usr/lib64/jvm/jre-1.5.0-gcj
      slave jre_exports: /usr/lib64/jvm-exports/jre-1.5.0-gcj
      slave rmiregistry: /usr/lib64/jvm/jre-1.5.0-gcj/bin/rmiregistry
    /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java - priority 1805
      slave java.1.gz: /usr/share/man/man1/java-java-1.8.0-openjdk.1.gz
      slave jre: /usr/lib64/jvm/jre-1.8.0-openjdk
      slave jre_exports: /usr/lib64/jvm-exports/jre-1.8.0-openjdk
      slave keytool: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/keytool
      slave keytool.1.gz: /usr/share/man/man1/keytool-java-1.8.0-openjdk.1.gz
      slave orbd: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/orbd
      slave orbd.1.gz: /usr/share/man/man1/orbd-java-1.8.0-openjdk.1.gz
      slave policytool: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/policytool
      slave policytool.1.gz: /usr/share/man/man1/policytool-java-1.8.0-openjdk.1.gz
      slave policytool.desktop: /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre/lib/desktop/policytool.desktop
      slave rmid: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/rmid
      slave rmid.1.gz: /usr/share/man/man1/rmid-java-1.8.0-openjdk.1.gz
      slave rmiregistry: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/rmiregistry
      slave rmiregistry.1.gz: /usr/share/man/man1/rmiregistry-java-1.8.0-openjdk.1.gz
      slave servertool: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/servertool
      slave servertool.1.gz: /usr/share/man/man1/servertool-java-1.8.0-openjdk.1.gz
      slave tnameserv: /usr/lib64/jvm/jre-1.8.0-openjdk/bin/tnameserv
      slave tnameserv.1.gz: /usr/share/man/man1/tnameserv-java-1.8.0-openjdk.1.gz
    Current 'best' version is '/usr/java/jdk1.8.0_71/jre/bin/java'.

    Then, when I want to choose one alternative:

    Code:
    marc@TheD:~/Downloads> sudo update-alternatives --config java
    root's password:
    There are 4 choices for the alternative java (providing /usr/bin/java).
    
      Selection    Path                                       Priority   Status
    ------------------------------------------------------------
    * 0            /usr/java/jdk1.8.0_71/jre/bin/java          18071     auto mode
      1            /usr/java/jdk1.8.0_71/jre/bin/java          18071     manual mode
      2            /usr/lib64/jdk_Oracle/bin/java              3         manual mode
      3            /usr/lib64/jvm/jre-1.5.0-gcj/bin/java       1500      manual mode
      4            /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java   1805      manual mode
    
    Press enter to keep the current choice[*], or type selection number: 2
    update-alternatives: using /usr/lib64/jdk_Oracle/bin/java to provide /usr/bin/java (java) in manual mode

    I mean, I can choose jdk_Oracle now, so thanks very much.

    But is the installation supposed to have all these warnings?
    I guess something goes wrong right?



    Best
    Marc
    it's good that you got it working, it's an old issue with Oracle's rpm, you'd think now they provide an rpm based Linux distro of their own they'd manage to make proper rpm files but you'd be wrong.

  10. #10
    Join Date
    Dec 2015
    Posts
    47

    Default Re: Installation of Java (Oracle)

    Just tried http://introcs.cs.princeton.edu/java...orld.java.html

    not working,
    Code:
    error: The public type HelloWorld must be defined in its own file
            public class HelloWorld
    Isn't there a way to completely throw out jdk and then install it new.

Page 1 of 2 12 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
  •