Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-102

JVM + System PATH environment = Version Skew



    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0 Alpha, 1.0, 1.0.1
    • 1.0.2
    • None
    • None
    • Windows, All


      When Tomcat 6 is installed, it prompts you for the location of the JVM you wish to use.

      However, it neither computes the necessary value for the PATH environment variable to make that JVM work, nor prompts you for it.

      Instead, it depends on the system's PATH environment variable happening to have on it the JRE's bin directory.

      If, however, it does not have a JRE bin directory, or it points to a DIFFERENT JRE – we have a problem.

      Basically, this is a formula for very mysterious failure. When the System path changed, due to a change in JVM for other purposes, Tomcat 6's service launcher mysteriously became unable to load the JVM.

      My workaround was to add the Environment configuration parameter with PATH=<a valid path>. (I did this via editing the registry; presumably I could have done it from the command line. But the GUI does NOT provide a way to set this!)

      It seems wrong to always embed the ENTIRE pah. Perhaps when launching a JVM it should silently do a SetDllDirectory to add the parent directory. This would ensure that it would find the CORRECT dlls. The current behavior does NOT find the correct DLLs unless (and while) the system PATH variable points to them.

      This makes the behavior consonant with what running the JVM from java.exe does, because the .exe's directory (same as the parent of the jvm.dll's directory) is automatically included in the DLL search path, earlier than the PATH variable.




            Unassigned Unassigned
            rwk Bob Kerns
            0 Vote for this issue
            0 Start watching this issue