[AuckLUG] A simple question from a simply newby ...
Ghodmode
ghodmode at ghodmode.com
Wed Sep 12 17:03:19 NZST 2007
On 9/12/07, zed <zed at zed.net.nz> wrote:
>
> Hi!
>
> Using openSUSE 10.2 and my simle question is:
>
> having downloaded the Java Runtime Environment <jre-6u2-linux-i586.bin>
> I've
> realised I have no idea how to install it:-(
>
> Would some kind person tell me how to do so, please?
> ...
Hi David,
First, you should know that you'll probably have an easier time
installing Java with YaST. I found a short tutorial on doing this at
http://en.opensuse.org/Java
Sun packages Java as a shell script with the data of the JRE at the end
of the file encoded and compressed. It's kind of a neat way of packaging
the files, but it's different from the way most Linux software is packaged.
Tich was right in that you can run it as an argument to sh, but there's
no reason to run it as root. In fact, I'd recommend against running this
one as root because that will make it more difficult to work with the files
afterward. All this script does is extract the files into a new
subdirectory of the current directory.
After running the script, you won't have Java installed in the way that
you might expect. None of the files will be in your path and the plugin
will not be in the correct location for your browser to find it. This can
get complicated because the installation paths are not really standardized
across distributions yet. I believe it's popular to put the new directory
into /opt, then use something like the update-alternatives (ref:
http://manpages.unixforum.co.uk/man-pages/linux/suse-linux-10.1/8/update-alternatives-man-page.html)
command to correct the paths for the related binaries.
The browser plugin is a little bit easier to install because its
location is pretty much standard, at least relative to individual users.
The plugin should be in the following path, relative to the subdirectory
created by the JRE installation script: plugin/i386/ns7/libjavaplugin_oji.so
Simply create a symbolic link to that file in your browser's plugin
directory using something similar to the following command:
ln -s $HOME/jre1.6.0_02/plugin/i386/ns7/libjavaplugin_oji.so
$HOME/.mozilla/plugins
Personally, I prefer to install the files in my own home directory. I
create a link to the Java installation directory as $HOME/java, then I put
links to useful binaries in $HOME/bin, which comes first in my path
settings. An example link would point to $HOME/java/bin/java. This allows
me to keep more than one version of Java installed for testing purposes.
More information about the AuckLUG
mailing list