Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-6975

Wrapper fails to find (expected) Java if path contains consecutive semicolons

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 2.7 rc1, 2.7
    • None
    • None
    • None

      Due to an undocumented behaviour of PathFindOnPath Win32 API function, directory list scanning is terminated once an empty directory name is found on the list.
      For Java Service Wrapper, this condition is met when the PATH variable contains at least two consecutive semicolons.

      This can have on of the following side effects:
      1. Java is not found at all.
      2. Java from Windows System directory is used instead of the one specified in path.

            [BAM-6975] Wrapper fails to find (expected) Java if path contains consecutive semicolons

            Yeah, it can be fixed by parsing PATH variable in a different way.

            Przemek Bruski added a comment - Yeah, it can be fixed by parsing PATH variable in a different way.

            AntonA added a comment - - edited

            Przemek,

            Can this be fixed at all?

            For example, use a different Win32 function. Or can we at least process the PATH variable and print an a very clear error with instruction on how to fix the PATH variable and stop?

            Cheers,
            Anton

            AntonA added a comment - - edited Przemek, Can this be fixed at all? For example, use a different Win32 function. Or can we at least process the PATH variable and print an a very clear error with instruction on how to fix the PATH variable and stop? Cheers, Anton

              pbruski Przemek Bruski
              pbruski Przemek Bruski
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: