Quote Originally Posted by jwilleke View Post
There appears to be several items that need to be performed to properly install Oracle Java.

Which I am okay with that as I can controll all my apps form the environement variables; but I am sure some people would not like this.

So I end up with some questions:
  • Is this the right method?
  • Where should Java be installed?
  • How can I change the priority of the IBM JDK to a lower number?
  • What is the /etc/alternatives folder supposed to be user for?
  • What is the /usr/lib64/java... folders supposed to be user for?


Any comments or suggestions are appreciated.
1.
As far as it the right method, it depends on where you got your documentation.
Was there a specific application that specifically required Oracle java? If not, why not use the default zypper installs?

server:~ # zypper search java
Loading repository data...
Reading installed packages...

S | Name | Summary | Type
--+------------------------+----------------------------------------+-----------
| ant-javadoc | Javadoc for ant | package
| ant-javamail | Optional javamail tasks for ant | package
| gcc43-java | The GNU Java Compiler | package
| java-1_6_0-ibm-fonts | Java(TM) 2 Runtime Environment | package
| java-1_6_0-ibm-jdbc | JDBC/ODBC bridge driver for java-1.6-> | package
| java-1_7_0-ibm | Java(TM) 6 Runtime Environment | srcpackage
i| java-1_7_0-ibm | Java(TM) 6 Runtime Environment | package
| java-1_7_0-ibm-devel | Java(TM) 6 SDK, Standard Edition | package
| java-1_7_0-ibm-jdbc | JDBC/ODBC bridge driver for java-1.6-> | package
| monodevelop-java | Monodevelop Java Addin | package
| sdk_java | SDK: Java Development | pattern
| slessp2-java-1_6_0-ibm | Security update for Java | patch
i| slessp2-java-1_7_0-ibm | Security update for Java | patch
...........

2.
server:~ # rpm -qa --list java-1_7_0-ibm | more
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0
/usr/lib64/jvm-exports/jre-1.7.0-ibm
/usr/lib64/jvm/jre-1.7.0-ibm

3.
I'm not exactly sure what you mean by changing the priority to a lower number, but commonly it's just whichever is in your path PATH first
export PATH=/path/to/preferred/java/version/bin/java;/bin;/sbin....

It's not uncommon to have many versions of java installed on some servers. Typically different applications require different versions.
Adjust your environmental variables accordingly (i.e. JAVA_HOME= and PATH= )

4.
/etc/alternatives appears to be just a directory of symbolic links, I'm not exactly sure what the advantage of having this is,
but if nothing else, it's a quick way to see all the paths.. to say.. all the versions of java. Also You use the alternatives link in your PATH.

server:/etc/alternatives # ls -l | grep jvm
lrwxrwxrwx 1 root root 45 Mar 22 13:23 ControlPanel -> /usr/lib64/jvm/jre-1.7.0-ibm/bin/ControlPanel
lrwxrwxrwx 1 root root 37 Mar 22 13:23 java -> /usr/lib64/jvm/jre-1.7.0-ibm/bin/java
lrwxrwxrwx 1 root root 62 Mar 22 13:23 javaplugin -> /usr/lib64/jvm/java-1.7.0-ibm-1.7.0/jre/lib/amd64//libnpjp2.so
lrwxrwxrwx 1 root root 39 Mar 22 13:23 javaws -> /usr/lib64/jvm/jre-1.7.0-ibm/bin/javaws
lrwxrwxrwx 1 root root 66 Mar 22 13:23 jce_1.7.0_ibm_local_policy -> /usr/lib64/jvm-private/java-1.7.0-ibm/jce/vanilla/local_policy.jar
lrwxrwxrwx 1 root root 70 Mar 22 13:23 jce_1.7.0_ibm_us_export_policy -> /usr/lib64/jvm-private/java-1.7.0-ibm/jce/vanilla/US_export_policy.jar
lrwxrwxrwx 1 root root 28 Mar 22 13:23 jre -> /usr/lib64/jvm/jre-1.7.0-ibm
lrwxrwxrwx 1 root root 28 Mar 22 13:23 jre_1.7.0 -> /usr/lib64/jvm/jre-1.7.0-ibm
lrwxrwxrwx 1 root root 36 Mar 22 13:23 jre_1.7.0_exports -> /usr/lib64/jvm-exports/jre-1.7.0-ibm
lrwxrwxrwx 1 root root 36 Mar 22 13:23 jre_exports -> /usr/lib64/jvm-exports/jre-1.7.0-ibm
lrwxrwxrwx 1 root root 28 Mar 22 13:23 jre_ibm -> /usr/lib64/jvm/jre-1.7.0-ibm
lrwxrwxrwx 1 root root 36 Mar 22 13:23 jre_ibm_exports -> /usr/lib64/jvm-exports/jre-1.7.0-ibm
lrwxrwxrwx 1 root root 40 Mar 22 13:23 keytool -> /usr/lib64/jvm/jre-1.7.0-ibm/bin/keytool
lrwxrwxrwx 1 root root 43 Mar 22 13:23 policytool -> /usr/lib64/jvm/jre-1.7.0-ibm/bin/policytool
lrwxrwxrwx 1 root root 37 Mar 22 13:23 rmid -> /usr/lib64/jvm/jre-1.7.0-ibm/bin/rmid
lrwxrwxrwx 1 root root 44 Mar 22 13:23 rmiregistry -> /usr/lib64/jvm/jre-1.7.0-ibm/bin/rmiregistry
lrwxrwxrwx 1 root root 42 Mar 22 13:23 tnameserv -> /usr/lib64/jvm/jre-1.7.0-ibm/bin/tnameserv
..........

5.
server:/etc/alternatives # rpm -qa --list java-1_7_0-ibm | grep /usr/lib64 | more
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jaas-1.7.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jaas-1.7.0_sr4.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jaas.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jce-1.7.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jce-1.7.0_sr4.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jce.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jdbc-stdext-1.7.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jdbc-stdext-1.7.0_sr4.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jdbc-stdext-3.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jdbc-stdext.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-1.7.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-1.7.0_sr4.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-cos-1.7.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-cos-1.7.0_sr4.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-cos.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-ldap-1.7.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-ldap-1.7.0_sr4.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-ldap.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-rmi-1.7.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-rmi-1.7.0_sr4.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi-rmi.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jndi.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jsse-1.7.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jsse-1.7.0_sr4.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/jsse.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/sasl-1.7.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/sasl-1.7.0_sr4.0.jar
/usr/lib64/jvm-exports/java-1.7.0-ibm-1.7.0/sasl.jar
..........

It's just where the supporting language, timezone, and other jar files live.