Support for multiple JDKs/JREs on one Win2k Server?

Discussions

General J2EE: Support for multiple JDKs/JREs on one Win2k Server?

  1. Hello

    I am trying to find out how if multiple versions of a JDK can be installed on a single Windows machine, and any limitations associated. In particular:

    1) Can multiple versions of a JDK be installed?

    2) How do I get an application to use one version over another? If I point to the Java.exe in a particular JDK bin sufficient to get the application to use that version of the JDK?

    3) What exactly is the JAVA_PATH environment variable used for?

    4) I have also read that applicatoins will look for a JRE directory in the current directory that it is run from, before it does other checks - is this correct?

    5) Is there any documentation that outlines this stuff in detail?

    Thanks
  2. Hello

    >
    > I am trying to find out how if multiple versions of a JDK can be installed on a single Windows machine, and any limitations associated. In particular:
    >
    > 1) Can multiple versions of a JDK be installed?

    Yes You can have multiple versions of JDK

    >
    > 2) How do I get an application to use one version over another? If I point to the Java.exe in a particular JDK bin sufficient to get the application to use that version of the JDK?

    Simply invoke the application with the complete path to required java.exe For example
    c:\jdk1.4.1\bin\java.exe <appName>
    >
    > 3) What exactly is the JAVA_PATH environment variable used for?
    >
    > 4) I have also read that applicatoins will look for a JRE directory in the current directory that it is run from, before it does other checks - is this correct?
    >
    > 5) Is there any documentation that outlines this stuff in detail?
    >
    > Thanks
  3. 3) What exactly is the JAVA_PATH environment variable used for?


    Some applications (Tomcat, J2SDKEE 1.3) use this environmental variable to indicate the location of the Java installation it should use, but this is just a common convention, not a standard.

    > 4) I have also read that applicatoins will look for a JRE directory in the current directory that it is run from, before it does other checks - is this correct?

    It depends on the application. For example, Eclipse does this. This is unusual, though, less common than JAVA_HOME.

    > 5) Is there any documentation that outlines this stuff in detail?

    Unfortunately, not really. You have to read the documentation of the application you want to launch to see how it handles locating the JVM (java.exe). The JAVA_HOME and JRE search are common tricks, but are by no means universal.