By default, Fedora Core 6 systems come with an old Java software installed, so you need to install a newer version of Java Runtime Environment to enjoy all the Java applications available.
Download linux version of JRE and save in /opt folder.
e.g. jre-1_5_0_09- linux-i586.bin
Make this file executable : chmod +x jre-1_5_0_xx-linux-i586.bin
And now, let's run the executable file with the following command:
./jre-1_5_0_xx-linux-i586.bin
You'll be prompted with the License Agreement, hit space until you are asked if you agree or not. Type Yes and the extraction process will begin. After the extraction process is finished, just remove the binary file with the following command:
rm -rf jre-1_5_0_xx-linux-i586.bin
Now, let's put the Java plugin into your browser's plugin folder. Konqueror, Firefox and Mozilla browsers will all look into the same folder, for plugins. So type the following command:
ln -s /opt/jre1.5.0_xx/plugin/i386/ns7/libjavaplugin_oji.so
/usr/lib/mozilla/plugins/libjavaplugin_oji.so
To make the Java executable available for the whole system, so you can run all the Java applications you encounter. Create the following file with your preferred text editor:
vi /etc/profile.d/java.sh
export J2RE_HOME=/opt/jre-1_5_0_xx-linux-i586.bin
export PATH=$J2RE_HOME/bin:$PATH
Type the following command to make that file available:
source /etc/profile.d/java.sh
Then type this command to see if the path is correct:
which java
You will see something like this: /opt/jre1.5.0_09/bin/java
Then type these commands:
/usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.5.0_xx/bin/java 2/usr/sbin/alternatives --config java
After you have entered the last command, you'll be asked to choose which Java software you want for your system. Just press 2 key and hit enter.
And finally, just type this command to see if everything looks good and your system has a new Java Environment:
/usr/sbin/alternatives --display java
And you can also type this command to see the version of your Java Runtime Environment:
java -version
It looks like this:
java version "1.5.0_09"Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)
You should now be able to run most of the Java applications out there, with the commands like:
java -jar application.jar
or
javaws application.jnlp
Aug 27, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment