Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-2172

Support consistent lookup of Java location in Controller and Agent start scripts for Windows

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 2.5.11, 2.7.3
    • None
    • None

    Description

      Current Situation 

      • The controller.cmd and agent.cmd start scripts implement:
        set JAVABIN=java.exe
        if exist "%JAVA_HOME%\bin\java.exe" set JAVABIN=%JAVA_HOME%\bin\java.exe
        
      • At the same time, the scripts call Java from its name like this:
        • Controller: controller.cmd
          for /f "usebackq" %%i in (`java -classpath "%JS7_CONTROLLER_LIBDIR%/classes" DefaultTimeZone 2^>nul`) do set JS7_CONTROLLER_TZ=%%i
          
        • Agent: agent.cmd
          for /f "usebackq" %%i in (`java -classpath "%JS7_AGENT_LIBDIR%/classes" DefaultTimeZone 2^>nul`) do set JS7_AGENT_TZ=%%i
          
      • This allows inconsistent use of Java locations if more than one Java version is available with the desired version being specified by the JAVA_HOME environment variable and the undesired version by the PATH environment variable.

      Desired Behavior

      • The controller.cmd and agent.cmd start scripts should replace
        `java -classpath
        

          by

        `%JAVABIN% -classpath
        

      Attachments

        Activity

          People

            oh Oliver Haufe
            ap Andreas Püschel
            Aakash Rao Aakash Rao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: