July 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

July 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

JDK INSTALL CENTOS 6.3

I need to use Java 1.7
So I downloaded jdk-7u17-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_17/lib/rt.pack
jsse.jar…
Error: Could not open input file: /usr/java/jre1.7.0_17/lib/jsse.pack
charsets.jar…
Error: Could not open input file: /usr/java/jre1.7.0_17/lib/charsets.pack
localedata.jar…
Error: Could not open input file: /usr/java/jre1.7.0_17/lib/ext/localedata.pack

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

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

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

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

3. jdk-7u17-linux-x64.rpm

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

# yum install ./jdk-7u17-linux-x64.rpm

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

# alternatives –install /usr/bin/java java /usr/java/jdk1.7.0_17/bin/java 2
# alternatives –config java

Display your default Java version:

# java -version
java version “1.7.0_17”
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>