how do you install java on linux mandriva .note im new to linux and really dont know what to do?
Saturday, July 24th, 2010 at
21:50
Linux reviews applications open source from SUSE Mandrake Mandriva Centos Redhat Debian and more
WARNING: If you use the method above, you might end up installing GNU Classpath which doesn’t work sometimes and it is not 100% compatible with Sun’s JRE.
To install Sun’s JRE:
You will need the root password to your system.
Go into java.sun.com and download the .bin file for JRE (or if you wish to do development, JDK, I will proceed though with JRE as it is most commonly used. Instructions for JDK are similar).
Once you have this file downloaded, open up a terminal and browse to that file.
type the command
chmod a+x <the file you just downloaded.bin>
This will give it executable permissions.
Now, type
su
and type your root password when prompted. This will give you the # prompt.
on your new prompt, type
cd opt
(note that you might need to create the opt directory. To do so, just type
mkdir /opt
Installing JRE on opt is much neater as it will be easier to remove later on if you need to. Also, it leans more to POSIX standards to do this)
mv /wherever/the/file/ you/downloaded/is/ filename.bin .
./<the file you just downloaded.bin>
Read the license and follow the on-screen steps, if prompted for an install dir, type /opt/jre-<version>
After that, you just need to link /usr/bin/java to /opt/jre-<version>/bin/java
You might do this manually, but i suggest using /usr/sbin/alternatives if available.
Optionally, you can install the firefox plugin. Just create a symlink pointing to
/opt/jre-<version>/plugin/ i386/ns7 /libjavaplugin_oji.so
on your
/usr/lib/firefox-<version> /plugins
directory (stupid yahoo truncated my statements, they should really fix that, eliminate added spaces, create symlinks using ln -s).
Cheers and let me know if you need more help.
Just like a plug and play.
I use fedora but a quick google search revealed that Mandriva uses a package management tool called urpm.
To install packages, try…
urpmi java
or similar. If you want to see what packages are available, try…
urpmi -y java
then you could selectively "urpmi" the appropriate packages.