Quick steps to install JDK 6 / Java SE 6 (+ Tomcat) in Fedora Core 6 / Fedora 7
Filed in archive Programming on August 9, 2007
An important component of the Java Platform is the Java Virtual Machine or JVM and since it is available for a number of hardware and software platforms, Java can act as both middleware and platform in its own way. As a result 'write once, run anywhere 'tag is associated with it. Available with JDK, JVM has been made a tough nut to crack by the Fedora Core developers but here are some really easy steps which can make installation of JDK 6 / Java SE 6 a child's play. Check the steps out here:
1. Login as root
2. First you need to download it from here. This works fine from GUI browsers like Firefox, Internet Explorer or Safari. However Sun makes it very hard (from java.sun.com) to download it for Linux console users (like those trying to install on their dedicated web server). You cannot access the download link from text based lynx browser. Fortunately there is a way. I found a secret location for you to easily download JDK 6 using wget or curl (console apps). This is also very useful if you are planning to use any download accelerators. The current binary (32 bit version) is here. This link will surely change with time so it is better to browse to the link above and then access this link from that page.
Download it using wget or curl. The command, for example, today will be:
wget http://www.java.net/.../jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin
Note: The link has been truncated for brevity, however it is hyperlinked to the actual link.
3. Now change the permission of the downloaded file to 755 like this:
chmod 755 jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin
4. Then run it:
./jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin
You will need to type yes to indicate your acceptance to their agreement and the installation will complete on its own. Unfortunately you are not yet done. Type java -version on the command line and you will see that it still points to the crappy old JVM from gcj.
5. Now you need to find the actual location of your JDK installation and indicate to Fedora to accept your choice.
Type the following:
updatedb;locate javac |grep bin
You will see an entry like this:
/usr/java/jdk1.6.0_02/bin/javac
Here /usr/java/jdk1.6.0_02 is the actual JAVA_HOME for your machine. Note this as you will need it to run the future commands.
Now you need to run the alternatives command to instruct Fedora to use Sun's JVM.
alternatives -install /usr/bin/java java /usr/java/jdk1.6.0_02/bin/java 100
alternatives -install /usr/bin/jar jar /usr/java/jdk1.6.0_02/bin/jar 100
alternatives -install /usr/bin/javac javac /usr/java/jdk1.6.0_02/bin/javac 100
You can do this for other Java executables too, should you need them, following the same pattern.
Note: If alternatives is not in your path then use locate alternatives to locate it.
Now you are done configuring Fedora for the most part. Type java -version and you should see something like this:
java version "1.6.0_02-ea"
Java(TM) SE Runtime Environment (build 1.6.0_02-ea-b02)
Java HotSpot(TM) Client VM (build 1.6.0_02-ea-b02, mixed mode, sharing)
Thnx taragana

2. First you need to download it from here. This works fine from GUI browsers like Firefox, Internet Explorer or Safari. However Sun makes it very hard (from java.sun.com) to download it for Linux console users (like those trying to install on their dedicated web server). You cannot access the download link from text based lynx browser. Fortunately there is a way. I found a secret location for you to easily download JDK 6 using wget or curl (console apps). This is also very useful if you are planning to use any download accelerators. The current binary (32 bit version) is here. This link will surely change with time so it is better to browse to the link above and then access this link from that page.
Download it using wget or curl. The command, for example, today will be:
wget http://www.java.net/.../jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin
Note: The link has been truncated for brevity, however it is hyperlinked to the actual link.
3. Now change the permission of the downloaded file to 755 like this:
chmod 755 jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin
4. Then run it:
./jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin
You will need to type yes to indicate your acceptance to their agreement and the installation will complete on its own. Unfortunately you are not yet done. Type java -version on the command line and you will see that it still points to the crappy old JVM from gcj.
5. Now you need to find the actual location of your JDK installation and indicate to Fedora to accept your choice.
Type the following:
updatedb;locate javac |grep bin
You will see an entry like this:
/usr/java/jdk1.6.0_02/bin/javac
Here /usr/java/jdk1.6.0_02 is the actual JAVA_HOME for your machine. Note this as you will need it to run the future commands.
Now you need to run the alternatives command to instruct Fedora to use Sun's JVM.
alternatives -install /usr/bin/java java /usr/java/jdk1.6.0_02/bin/java 100
alternatives -install /usr/bin/jar jar /usr/java/jdk1.6.0_02/bin/jar 100
alternatives -install /usr/bin/javac javac /usr/java/jdk1.6.0_02/bin/javac 100
You can do this for other Java executables too, should you need them, following the same pattern.
Note: If alternatives is not in your path then use locate alternatives to locate it.
Now you are done configuring Fedora for the most part. Type java -version and you should see something like this:
java version "1.6.0_02-ea"
Java(TM) SE Runtime Environment (build 1.6.0_02-ea-b02)
Java HotSpot(TM) Client VM (build 1.6.0_02-ea-b02, mixed mode, sharing)
Tags: Fedora Core 6 / Fedora 7 JDK 6 / Java SE 6 SunJava java fedora+core
Vote for Quick steps to install JDK 6 / Java SE 6 (+ Tomcat) in Fedora Core 6 / Fedora 7:
|
Rating: 5.80 out of 5 vote(s) cast.
|
Response from:
ellappan
(07/18/08 12:31am)
hi i am mca student.so i want this software.
| CW工具栏 | ![]() |
| RSS | |
|
| |
| Yodao |
|
| Netvibes |
|
| Anothr | |
| Follow us on Twitter! |
Most Popular
AJAX
Application Development
Awards
Basics
Best of
Business
conference
Did you know
E-Commerce
Information About
Management
Misc
Mobile Devices
mobile phones
Monthly Contest
Personal
Programming
Quick introduction
Security
Service Oriented Architectures

