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

run.bat fails to execute when it contains a path with a folder name has brackets "( )"

XMLWordPrintable

    • Hide

      1. Unzip JBoss EAP 5.1.0 in a folder named with brackets (ie. C:\test(mytest)\jboss-eap-5.1).
      2. Run %JBOSS_HOME%\bin\run.bat
      3. You should see this error message - \Jboss-5.1.0\bin\run.conf.bat was unexpected at this time

      Show
      1. Unzip JBoss EAP 5.1.0 in a folder named with brackets (ie. C:\test(mytest)\jboss-eap-5.1). 2. Run %JBOSS_HOME%\bin\run.bat 3. You should see this error message - \Jboss-5.1.0\bin\run.conf.bat was unexpected at this time
    • Release Notes
    • Workaround Exists
    • Hide

      Putting "" around the echo statements fixes this error.

      if exist "%RUN_CONF%" (

      echo "Calling %RUN_CONF%"

      call "%RUN_CONF%" %*

      ) else (

      echo "Config file not found %RUN_CONF%"

      )

      Show
      Putting "" around the echo statements fixes this error. if exist "%RUN_CONF%" ( echo "Calling %RUN_CONF%" call "%RUN_CONF%" %* ) else ( echo "Config file not found %RUN_CONF%" )
    • Low
    • Hide
      Due to missing quotation of certain echo statements in the <filename>run.bat</filename> script, JBoss Enterprise Application Server failed to start if the JBOSS_HOME path contained one or more parentheses (e.g. <filename>C:\JB-EAP(test)\jboss-eap-5.1\jboss-as</filename>), and returned the following error message:

      <screen>
      \Jboss-5.1.0\bin\run.conf.bat was unexpected at this time.
      </screen>

      Double quotes have been added around the echo statements in the <filename>run.bat</filename> file, ensuring that JBoss Enterprise Application Server starts successfully even if the JBOSS_HOME path contains parentheses.
      Show
      Due to missing quotation of certain echo statements in the <filename>run.bat</filename> script, JBoss Enterprise Application Server failed to start if the JBOSS_HOME path contained one or more parentheses (e.g. <filename>C:\JB-EAP(test)\jboss-eap-5.1\jboss-as</filename>), and returned the following error message: <screen> \Jboss-5.1.0\bin\run.conf.bat was unexpected at this time. </screen> Double quotes have been added around the echo statements in the <filename>run.bat</filename> file, ensuring that JBoss Enterprise Application Server starts successfully even if the JBOSS_HOME path contains parentheses.
    • Documented as Resolved Issue
    • NEW

      If the JBOSS_HOME path contains "( )" in the path then the run.bat fails to execute. For example if the JBOSS_HOME is set to "c:\Program Files (test)\JBoss" then the run.bat fails to execute with the following error message:-

      \Jboss-5.1.0\bin\run.conf.bat was unexpected at this time.

      This error is due to not having the double quotes in the echo statements below:-

      if exist "%RUN_CONF%" (
      echo Calling %RUN_CONF%
      call "%RUN_CONF%" %*
      ) else (
      echo Config file not found %RUN_CONF%
      )

            rhn-support-tibrahim Taneem Ibrahim
            rhn-support-tibrahim Taneem Ibrahim
            Petr Penicka Petr Penicka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: