Sun Java installation issues
NoOp
glgxg at sbcglobal.net
Tue Sep 23 21:17:19 UTC 2008
On 09/23/2008 01:01 PM, Diogo Böhm wrote:
> Depends on what you mean with "latest", there's a quite updated version on
> the repositories, which you can install accessing Synaptic and looking for
> "sun-java6-jre", or alternatively going to a console and typing "sudo
> apt-get install sun-java6-jre".
>
> Now, if you're talking about installing the latest Java JRE version,
> available on java.com, that has different steps, mentioned in it's own page
> inside java.com.
>
To install from Sun:
Assuming that you have a 32bit system (do you?), go to:
http://java.sun.com/javase/downloads/index.jsp
and download the file for "Java Runtime Environment (JRE) 6 Update 7"
(unless you are adventurous and want to try Java SE 6 Update 10 RC).
Read the installation instructions from:
http://java.sun.com/javase/6/webnotes/install/jre/install-linux.html
[Installation of Self-Extracting Binary]
You'll want this one to go in your /usr/lib/jvm directory so that you
can use it system-wide.
1. Open a terminal and cd to the directory where you downloaded the java
bin file.
2. Copy the bin:
sudo cp jre-6u7-linux-i586.bin /usr/lib/jvm
3. Unpack and install it:
cd /usr/lib/jvm
sudo chmod +x jre-6u7-linux-i586.bin
sudo ./jre-6u7-linux-i586.bin
Answer 'yes' to the license instructions. That will then install a
/usr/lib/jvm/jre1.6.0_07 folder. So assuming that you want to use this
version of Java in your Mozilla applications (FireFox, SeaMonkey) now
you need to create a symbolic link in your ~/.mozilla/plugins folder to
that installation.
4. Move back to the ~/.mozilla folder and make a plugins directory if
you do not already have one:
cd ~/.mozilla
mkdir plugins
cd plugins
5. Now make the symbolic link:
ln -s /usr/lib/jvm/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so
And you should be good to go.
Now test java; open FireFox enter: about:plugins in the url bar and make
sure that you have the Java plugin and that it shows Java(TM) Plug-in
1.6.0_07-b06
Go to: http://java.com and click the "Do I have Java" link. The link
will perform a test and you should get the "You have the recommended
Java installed (Version 6 Update 7).".
In the future if you install Java 10 etc., follow the same procedures
and replace the old ~/.mozilla/plugins symlink to
/usr/lib/jvm/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so
to the new version that you installed so that it will be:
ln -s /usr/lib/jvm/<newversion>/plugin/i386/ns7/libjavaplugin_oji.so
Note: *Always* create a symbolic link to the Java plugin, rather than
copying actual libjavaplugin_oji.so to the ~/.mozilla/plugins folder.
Placing the actual file in ~/.mozilla/plugins will cause your browser to
crash.
More information about the ubuntu-users
mailing list