SL-java-fuu: Difference between revisions

From Cheatsheet
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
After rebooting into the most up to date kernel, go to the following link and grad the newest version of java7 JDK(not JRE, needs to be JDK)
After rebooting into the most up to date kernel, go to the following link and grad the newest version of java7 JDK(not JRE, needs to be JDK)


  Java [Download http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html]
  Java [http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html Download]
 
Download the  "Linux x64 104.78 MB  jdk-7u*-linux-x64.rpm" and it should ask you if you want to install it with the package manger please do so.
 
Next run the following commands to change alternatives to use this version of java.
 
alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_17/bin/java 99
alternatives --config java
 
Now you will have the following output on your screen.
<pre>
[root@VoV [/]$  alternatives --config java
 
There is 1 program that provides 'java'.
 
  Selection    Command
-----------------------------------------------
*+ 1          /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
  2          /usr/java/jdk1.7.0_17/bin/java
 
Enter to keep the current selection[+], or type selection number:       
</pre>
 
In the above scenario I want want to use the jdk, so choose option 2.

Revision as of 00:08, 10 March 2013

So first off and for good measure I would run

yum update

After rebooting into the most up to date kernel, go to the following link and grad the newest version of java7 JDK(not JRE, needs to be JDK)

Java Download

Download the "Linux x64 104.78 MB jdk-7u*-linux-x64.rpm" and it should ask you if you want to install it with the package manger please do so.

Next run the following commands to change alternatives to use this version of java.

alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_17/bin/java 99
alternatives --config java

Now you will have the following output on your screen.

[root@VoV [/]$  alternatives --config java

There is 1 program that provides 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
   2           /usr/java/jdk1.7.0_17/bin/java

Enter to keep the current selection[+], or type selection number:        

In the above scenario I want want to use the jdk, so choose option 2.