Fix for issue 2035 (Use OpenDS specific environment variables to determine the JVM to be used.)
Use two environment variables to know which is the JVM to be used by the scripts: OPENDS_JAVA_BIN and OPENDS_JAVA_HOME.
When the setup creates the file lib/set-java-home it writes the contents of OPENDS_JAVA_HOME to it (instead of JAVA_HOME which was the previous behavior).
Before these changes, the scripts used to look for JAVA_BIN, then JAVA_HOME and finally for the contents of the set-java-home file. The problem with this approach is that if the user required to specify JAVA_HOME or JAVA_BIN to an unsupported version of the JDK (because some other program in the machine had this requirement) the scripts of OpenDS could not run. Now the checks that we do to figure out the JVM are done in the following order:
1. Check if OPENDS_JAVA_BIN is defined in the environment.
2. Check if OPENDS_JAVA_HOME is defined in the environment.
3. Check if OPENDS_JAVA_HOME is defined in the lib/set-java-home file.
4. Check if JAVA_BIN is defined in the environment.
5. Check if JAVA_HOME is defined in the environment.
6. Check if we can figure out the java installation by executing "type java" (in UNIX environments).
If any of the above checks is positive, we will try to use the JVM found.
Extras: the uninstall script on UNIX now checks that we are using a JDK compatible with 1.5 and displays a user friendly message if it does not.