Results 1 to 8 of 8

Thread: Strange error attempting to install Oracle JRE 8

  1. #1
    Join Date
    Feb 2009
    Location
    Concordia, MO, USA
    Posts
    156

    Question Strange error attempting to install Oracle JRE 8

    I'm installing Oracle Java 8 because it's required by another software package. I'm following the instructions in https://en.opensuse.org/SDB:Installi...Oracle.27s_RPM and the JDK install went fine, but installing JRE is going badly. Here's what I'm seeing:
    Code:
    @17:55:39,root@pinto
    ~
    █ rpm -ivf /usr/local/RPMrepository/jre-8u221-linux-x64.rpm
    warning: /usr/local/RPMrepository/jre-8u221-linux-x64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
    Preparing packages...
            package jre1.8-1.8.0_221-fcs.x86_64 is already installed
    @17:56:52,root@pinto
    ~
    █ ll /usr/java/jre1.8.0_221-amd64/bin/java
    -rwxr-xr-x 1 root root 8534 2019-07-04 06:41:51 /usr/java/jre1.8.0_221-amd64/bin/java
    @17:57:02,root@pinto
    ~
    █ file /usr/java/jre1.8.0_221-amd64/bin/java
    /usr/java/jre1.8.0_221-amd64/bin/java: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.9, not stripped
    @17:57:06,root@pinto
    ~
    █ /usr/java/jre1.8.0_221-amd64/bin/java -version
    java version "1.8.0_221"
    Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
    @17:57:09,root@pinto
    ~
    █ update-alternatives --install  "/usr/bin/java" "java" "/usr/java/jre1.8.0_211-amd64/bin/java" 1
    update-alternatives: error: alternative path /usr/java/jre1.8.0_211-amd64/bin/java doesn't exist
    For some reason, update-alternatives doesn't recognize the java module. What's going on?

    Leslie

  2. #2
    Join Date
    Sep 2012
    Posts
    5,202

    Default Re: Strange error attempting to install Oracle JRE 8

    Quote Originally Posted by jlturriff View Post
    What's going on?
    Run
    Code:
    strace -f -o /tmp/java.strace update-alternatives --install  "/usr/bin/java" "java" "/usr/java/jre1.8.0_211-amd64/bin/java" 1
    and post /tmp/java.strace to http://susepaste.org/

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

    Default Re: Strange error attempting to install Oracle JRE 8

    When you install a JDK, the JRE should already be included.
    Don't do anything more, and it's unknown if you do anything whether you might damage your JDK/JRE.

    In other words, just point your alternatives to your JDK and your apps that require the JRE will "just work."

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4
    Join Date
    Feb 2009
    Location
    Concordia, MO, USA
    Posts
    156

    Default Re: Strange error attempting to install Oracle JRE 8

    Quote Originally Posted by arvidjaar View Post
    Run
    Code:
    strace -f -o /tmp/java.strace update-alternatives --install  "/usr/bin/java" "java" "/usr/java/jre1.8.0_211-amd64/bin/java" 1
    and post /tmp/java.strace to http://susepaste.org/
    I don't seem to be able to create an entry in http://susepaste.org/; I get this message when I press the [create] button:
    Code:
    openSUSE Paste >  Error                         Login                                          
     404 Page Not Found
    The page you requested was not found.
    N.B. If I try to login to http://susepaste.org/ it asks for an "OpenID", whatever that is.

    Leslie

  5. #5
    Join Date
    Feb 2009
    Location
    Concordia, MO, USA
    Posts
    156

    Default Re: Strange error attempting to install Oracle JRE 8

    Quote Originally Posted by tsu2 View Post
    When you install a JDK, the JRE should already be included.
    Don't do anything more, and it's unknown if you do anything whether you might damage your JDK/JRE.

    In other words, just point your alternatives to your JDK and your apps that require the JRE will "just work."

    TSU
    Oh, yes; reviewing the SDB article, I see that I overlooked that in the introductory information.

    So (just to be sure I understand how this works) the update-alternatives settings for the JDK will carry over to the JRE as well? My system still retains the Java 10 that came with the original installation, for use by other more up-to-date tools.

    Leslie

  6. #6
    Join Date
    Feb 2009
    Location
    Concordia, MO, USA
    Posts
    156

    Default Re: Strange error attempting to install Oracle JRE 8

    Quote Originally Posted by tsu2 View Post
    When you install a JDK, the JRE should already be included.
    Don't do anything more, and it's unknown if you do anything whether you might damage your JDK/JRE.

    In other words, just point your alternatives to your JDK and your apps that require the JRE will "just work."

    TSU
    I am concerned as to whether JRE 8 will work properly with the update-alternatives system because of what I see in its configuration:

    Code:
    @14:24:27,root@pinto
    ~
    █ update-alternatives --config java
    There are 2 choices for the alternative java (providing /usr/bin/java).
    
      Selection    Path                                    Priority   Status
    ------------------------------------------------------------
      0            /usr/lib64/jvm/jre-10-openjdk/bin/java   2005      auto mode
    * 1            /usr/java/latest/bin/java                1         manual mode
      2            /usr/lib64/jvm/jre-10-openjdk/bin/java   2005      manual mode
    
    Press <enter> to keep the current choice[*], or type selection number:
    @14:24:44,root@pinto
    ~
    █ update-alternatives --config javac
    There are 2 choices for the alternative javac (providing /usr/bin/javac).
    
      Selection    Path                                      Priority   Status
    ------------------------------------------------------------
      0            /usr/lib64/jvm/java-10-openjdk/bin/javac   2005      auto mode
    * 1            /usr/java/jdk1.8.0_221-amd64/bin/javac     3         manual mode
      2            /usr/lib64/jvm/java-10-openjdk/bin/javac   2005      manual mode
    
    Press <enter> to keep the current choice[*], or type selection number:
    Leslie

  7. #7
    Join Date
    Feb 2009
    Location
    Concordia, MO, USA
    Posts
    156

    Default Re: Strange error attempting to install Oracle JRE 8 - Resolved

    As pointed out, the JDK contains the JRE, so installation of JRE would be redundant. Further testing confirms that it is not needed.

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

    Default Re: Strange error attempting to install Oracle JRE 8

    Quote Originally Posted by jlturriff View Post
    Oh, yes; reviewing the SDB article, I see that I overlooked that in the introductory information.

    So (just to be sure I understand how this works) the update-alternatives settings for the JDK will carry over to the JRE as well? My system still retains the Java 10 that came with the original installation, for use by other more up-to-date tools.

    Leslie
    Think of the situation this way...

    The Java Runtime Environment (JRE) is only what is necessary to provide what is needed to run a Java application.
    The Java Development Kit (JDK) is a collection of development tools, but how can you use those tools without being able to run the Java application you're building? - So, the JRE has to be included in the JDK.

    If you have the JDK 10 (oracle or openjdk), you should see an alternatives entry, so can switch between any you wish.
    Typically, apps will run in at least the next more recent version without a problem.
    Also, you should know that no matter what documentation says, apps should be able to run in the Oracle or openjdk versions of Java (JRE) with no difference, and although at one time there was only one significant compiler difference I notice that today several tools might be evolving at a different paces (JDK).
    Note that the "openjdk" package is actually the JRE, and "openjdk-devel" is the JDK.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Tags for this Thread

Posting Permissions

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