This discussion is archived
2 Replies Latest reply: Dec 17, 2012 5:41 PM by 980076 RSS

Oracle Linux and Java 7u10

980076 Newbie
Currently Being Moderated
Hi all,

I installed Oracle Linux Server 6.3 selecting "software Development System" (java 1.6.0 comes with it).
but I need to use Java 1.7
So I downloaded jdk-7u10-linux-x64.rpm

when I try to install it, I get the following error.

Unpacking JAR files...
     rt.jar...
Error: Could not open input file: /usr/java/jre1.7.0_10/lib/rt.pack
     jsse.jar...
Error: Could not open input file: /usr/java/jre1.7.0_10/lib/jsse.pack
     charsets.jar...
Error: Could not open input file: /usr/java/jre1.7.0_10/lib/charsets.pack
     localedata.jar...
Error: Could not open input file: /usr/java/jre1.7.0_10/lib/ext/localedata.pack

I can't uninstall java 1.6 because other rpm uses it.

Can someone tell me what the "proper" way to install Oracle Linux and Java 1.7 should be?
OR is there a Oracle Linux Server 6.4 coming out soon with Java 1.7 as its default package set ;-)

thanks in advance,
c.w.
  • 1. Re: Oracle Linux and Java 7u10
    Dude! Guru
    Currently Being Moderated
    You can ignore the errors. The files named in the error lines do not exist in the rpm package, but are there as .jar files

    The following works under Oracle Linux 6.3 x86_64 (and probably other versions).

    1. Open the following URL in a web browser on your PC:

    <pre>
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    </pre>

    2. Click the JDK download button, accept the license agreement and download the JDE rpm package.

    3. Copy the following file to your Oracle Linux server (SFTP):

    <pre>
    jdk-7u10-linux-x64.rpm
    </pre>

    4. Login as root and use the YUM utility to install the RPM package.

    <pre>
    # yum install ./jdk-7u10-linux-x64.rpm
    </pre>

    5. Register the new installed java version, then change your default Java:

    <pre>
    # alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_10/bin/java 2
    # alternatives --config java
    </pre>

    Display your default Java version:

    <pre>
    # java -version
    java version "1.7.0_10"
    Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
    Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
    </pre>
  • 2. Re: Oracle Linux and Java 7u10
    980076 Newbie
    Currently Being Moderated
    thanks so much. It worked !!!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points