I am unable to run standalone.bat if path to EAP contains parentheses. W:\pkrmens\Program Files (x86)\jboss-eap-6.1\bin>standalone.bat \jboss-eap-6.1 was unexpected at this time. domain.bat, standalone.sh and standalone.bat works fine
updating last line of my previous comment: domain.bat, standalone.sh and domain.sh works fine
Jason, can you please look into this? Thanks!
Is there any news on this? "C:\Program Files (x86)\EAP-6.1.0" is default installation path on windows (when using installer). User won't be able to run EAP in standalone mode neither by using start-menu shortcut nor by directly invoking standalone.bat script, if he choose default installation path.
Any movement on this? Is it resolved? A known issue? More information is required before this can be included in the 6.1.0 Release Notes.
Russell, Petr, James Perkins, and I spent some time debugging this. It turns out the problem is with line 77 of the script: echo JBOSS_HOME: %JBOSS_HOME% It is located within this "if" statement: if /i "%RESOLVED_JBOSS_HOME%" NEQ "%SANITIZED_JBOSS_HOME%" ( echo. echo WARNING: JBOSS_HOME may be pointing to a different installation - unpredictable results may occur. echo. echo JBOSS_HOME: %JBOSS_HOME% echo. rem 2 seconds pause ping 127.0.0.1 -n 3 > nul ) The echoed directory name contains an ending parenthesis and DOS thinks that it ends the "if" statement. Basically, it's processing it like this: if /i "%RESOLVED_JBOSS_HOME%" NEQ "%SANITIZED_JBOSS_HOME%" ( echo. echo WARNING: JBOSS_HOME may be pointing to a different installation - unpredictable results may occur. echo. echo JBOSS_HOME: C:\Program Files (x86 ) \jboss-eap-6.1 It has no idea what to do with "\jboss-eap-6.1" The work-around is to put double quotes around the %JBOSS_HOME% at line 77 as follows: echo JBOSS_HOME: "%JBOSS_HOME%"
Scott, here's something to get you started with the release notes: If you use the Windows installer and install JBoss Enterprise Platform 6.1 to a default directory containing parentheses, for example "C: Program Files (x86)\jboss-eap-6.1", the standalone.bat file may fail with a message "\jboss-eap-6.1 was unexpected at this time". This is because the DOS processor interprets the ending parenthesis in the echoed JBoss path name as the end of the preceding "if" statement. To resolve this issue: 1. Open the JBOSS_HOME\bin\standalone.bat file in an editor. 2. Find line 77 in the file. It should be: echo JBOSS_HOME: %JBOSS_HOME% 3. Edit the line by putting double-quotes around the %JBOSS_HOME% as follows: echo JBOSS_HOME: "%JBOSS_HOME%"
It appears there are additional problems with the scripts. For example, if you have defined a JBOSS_HOME environment variable, it executes differently depending on whether it is defined with quotes or without quotes. For example: SET JBOSS_HOME="C:\Program Files (x86)\jboss-eap-6.1" runs into an issue with this line: if "x%JBOSS_HOME%" == "x" SET JBOSS_HOME=C:\Program Files (x86)\jboss-eap-6.1 runs into other issues. James is looking into this further.
Thanks Sande. I've added a release note based on your findings.
Upstream PR for the fix https://github.com/wildfly/wildfly/pull/4520
James Perkins <jperkins> made a comment on jira WFLY-1358 Pull request merged.
I retested this with latest EAP build and the issue is fixed. Verified on EAP 6.2.0.ER5.
Release notes text added for inclusion in the JBoss EAP 6.2.0 Release Notes document.