HowTo: Install sun's jre-1_5_0_05 the non-repo way
发表于 : 2005-10-31 11:36
I hope this will be useful to someone. I couldn't find java-package in the repositories because I hadn't added multiverse. So, I installed java in a different way.
First, download the linux runtime installer here. Do NOT get the rpm! Get the one that says Linux (self-extracting file).
After downloading, cd to where you downloaded the file and run:
Code:
sudo mv jre-1_5_0_05-linux-i586.bin /usr/local cd /usr/local sudo chmod a+x jre-1_5_0_05-linux-i586.bin sudo sh jre-1_5_0_05-linux-i586.bin
Say 'yes' to the license agreement and watch it extract the files into a folder called jre1.5.0_05
You're almost done. Now you want to install the plugin for firefox:
Code:
cd /usr/lib/mozilla-firefox/plugins sudo ln -s /usr/local/jre1.5.0_05/plugin/i386/ns7/libjavaplugin_oji.so
Firefox is now happily running java applets.
The final steps are:
Code:
sudo ln -sf /usr/local/jre1.5.0_05/bin/java_vm /usr/bin/java_vm sudo update-alternatives --install /usr/bin/java java /usr/local/jre1.5.0_05/bin/java 1
And now the java runtime environment appears in your list of choices when running 'sudo update-alternatives --config java'! Go ahead and run that, and chose the sun java option. Then to check to make sure it worked, run 'java -version', which should output something like this:
Code:
java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
Done!
If you want to do some configurating with the java control pannel, run 'sh /usr/local/jre1.5.0_05/bin/ControlPanel'.
Enjoy!
=========================
Removal Instructions
If the time comes when you need/want to remove java, these commands will do the trick if you followed the howto exactly:
Code:
sudo rm /usr/lib/mozilla-firefox/plugins/libjavaplugin_oji.so sudo rm /usr/bin/java_vm sudo update-alternatives --remove java /usr/local/jre1.5.0_05/bin/java
Then you'll want to open up a root nautilus and go to /usr/loca/ and delete the jre1.5.0_05 folder. That should do it.
http://ubuntuforums.org/showthread.php? ... light=java
First, download the linux runtime installer here. Do NOT get the rpm! Get the one that says Linux (self-extracting file).
After downloading, cd to where you downloaded the file and run:
Code:
sudo mv jre-1_5_0_05-linux-i586.bin /usr/local cd /usr/local sudo chmod a+x jre-1_5_0_05-linux-i586.bin sudo sh jre-1_5_0_05-linux-i586.bin
Say 'yes' to the license agreement and watch it extract the files into a folder called jre1.5.0_05
You're almost done. Now you want to install the plugin for firefox:
Code:
cd /usr/lib/mozilla-firefox/plugins sudo ln -s /usr/local/jre1.5.0_05/plugin/i386/ns7/libjavaplugin_oji.so
Firefox is now happily running java applets.
The final steps are:
Code:
sudo ln -sf /usr/local/jre1.5.0_05/bin/java_vm /usr/bin/java_vm sudo update-alternatives --install /usr/bin/java java /usr/local/jre1.5.0_05/bin/java 1
And now the java runtime environment appears in your list of choices when running 'sudo update-alternatives --config java'! Go ahead and run that, and chose the sun java option. Then to check to make sure it worked, run 'java -version', which should output something like this:
Code:
java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
Done!
If you want to do some configurating with the java control pannel, run 'sh /usr/local/jre1.5.0_05/bin/ControlPanel'.
Enjoy!
=========================
Removal Instructions
If the time comes when you need/want to remove java, these commands will do the trick if you followed the howto exactly:
Code:
sudo rm /usr/lib/mozilla-firefox/plugins/libjavaplugin_oji.so sudo rm /usr/bin/java_vm sudo update-alternatives --remove java /usr/local/jre1.5.0_05/bin/java
Then you'll want to open up a root nautilus and go to /usr/loca/ and delete the jre1.5.0_05 folder. That should do it.
http://ubuntuforums.org/showthread.php? ... light=java