Installing Sun's Java on openSUSE
From openSUSE
Because of licensing issues Sun's Java Edition can not be included on the CDs of the download edition of openSUSE.
Here is a quick guide how to install it.
Contents |
Other Java related topics
- Installing Eclipse plugins as non-root user
- Using tomcat5 from within Eclipse
- Tomcat HOWTO
- How to use JBoss 3.2.5 with the Eclipse WTP plugin
- setDefaultJava / setJava replacements
- The Eclipse on Linux project
- Netbeans 5 for SUSE Linux / openSUSE
Installing Java through YaST
Make sure your repositories include the openSUSE non-oss repository. You can browse the server directory to see what packages are included in the latest version of openSUSE.
Installing Java Packages
Now you can install the Java packages with YaST (Software/Software Management). If you choose Filter "Search" and enter "Sun" you'll quickly find them.
| Don't forget to install java-1_6_0-sun-plugin if you want Java support for your browser. |
Switching between two different Java JREs or SDKs
The current Java packages use the update-alternatives command. It creates symbolic links to the common Java binaries of the currently used Java version. This can be used to switch between different versions of installed Java JREs and SDKs (e.g. Sun Java 1.5, Sun Java 1.4.2 and IBM Java 1.4.2).
As root, you can call
update-alternatives --config java
to change all JRE-related links to one special JRE version
and
update-alternatives --config javac
to change all JDK-related links to one special SDK version
These commands will provide you with a menu that lists all possible JREs or SDKs.
Installing Java Manually
You may need to install Java (jre for what will be shown here) manually, to fit needs of last uptodate version. This comment is verifyed for openSUSE 11.1 and Firefox 3.0.10.
Operating instructions are here [1], but not complete.
- First you may have to uninstall the previous jre versions through YaST;
- Second you have to download jre from SUN;
- Use the "Linux RPM self extracting file" (first option in the download list);
- You don't have any choice, the jre will be installed in the folder /user/java by the rpm... So you can run the binary file from anywhere in your computer (as root);
- openSUSE uses /usr/lib/browser-plugins/ as default for Firefox, it's probably better to use it, anyway there is no way to know where Firefox takes it's plugins. You may use locate (in find-utils) or beagle to find and remove all the Mozilla java plugins;
- the ln -s... example in the SUN page is oddly cut by a new line when it shouldn't; the actual library is libjavaplugin_oji.so in the NS7 folder, the . (dot) is part of the command as it allows creating a link of the same name in the plugin folder;
- after that, the "about:plugins" URI in Firefox (after restarting it) or the plugin list in the option settings must show jre and page allows testing.
Categories: HOWTOs | Installation | Java

