Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10648

run.bat sets property -Dprogram.name on windows wrongly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • TBD EAP 5
    • EAP_EWP 5.2.0
    • Scripts and Commands
    • None
    • Windows

    • Hide

      copy run.conf.bat my.conf.bat
      run.bat -r my.conf.bat

      => you will see the program name to be "my.conf.bat" instead of the expected "run.bat"

      Show
      copy run.conf.bat my.conf.bat run.bat -r my.conf.bat => you will see the program name to be "my.conf.bat" instead of the expected "run.bat"
    • Workaround Exists
    • Hide

      move the lines with
      set "PROGNAME=

      to the top, line 11:

      if "%OS%" == "Windows_NT" (
      set "DIRNAME=%~dp0%"
      set "PROGNAME=%~nx0%"
      ) else (
      set DIRNAME=.\
      set "PROGNAME=run.bat"
      )

      Show
      move the lines with set "PROGNAME= to the top, line 11: if "%OS%" == "Windows_NT" ( set "DIRNAME=%~dp0%" set "PROGNAME=%~nx0%" ) else ( set DIRNAME=.\ set "PROGNAME=run.bat" )
    • Low
    • Hide
      In previous versions of JBoss EAP 5, specifying a particular <filename>run.conf.bat</filename> with the '-r' option made the <property>program.name</property> property incorrectly use the configuration's file name as the program name. This issue has been resolved in this release.
      Show
      In previous versions of JBoss EAP 5, specifying a particular <filename>run.conf.bat</filename> with the '-r' option made the <property>program.name</property> property incorrectly use the configuration's file name as the program name. This issue has been resolved in this release.
    • Documented as Resolved Issue
    • NEW

      implementation of JBPAPP-7454 on windows platform (-r option)
      shifts the commandline %0, therefore in the fragment

      set DIRNAME=
      if "%OS%" == "Windows_NT" (
      set "PROGNAME=%~nx0%"
      ) else (
      set "PROGNAME=run.bat"
      )

      the %~nx0% evaluates to the wrong argument

              tfonteyn Tom Fonteyne (Inactive)
              tfonteyn Tom Fonteyne (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: