Slow execution of standalone.bat from JBoss EAP 6.1.0

Solution Verified - Updated -

Issue

Following part of standalone.bat takes 40 seconds to execute:

:DIRLOOP
echo(%CONSOLIDATED_OPTS% | findstr /r /c:"^-Djboss.server.base.dir" > nul && (
for /f "tokens=1,2* delims==" %%a IN ("%CONSOLIDATED_OPTS%") DO (
for /f %%i IN ("%%b") DO set "JBOSS_BASE_DIR=%%~fi"
)
)
echo(%CONSOLIDATED_OPTS% | findstr /r /c:"^-Djboss.server.config.dir" > nul && (
for /f "tokens=1,2* delims==" %%a IN ("%CONSOLIDATED_OPTS%") DO (
for /f %%i IN ("%%b") DO set "JBOSS_CONFIG_DIR=%%~fi"
)
)
echo(%CONSOLIDATED_OPTS% | findstr /r /c:"^-Djboss.server.log.dir" > nul && (
for /f "tokens=1,2* delims==" %%a IN ("%CONSOLIDATED_OPTS%") DO (
for /f %%i IN ("%%b") DO set "JBOSS_LOG_DIR=%%~fi"
)
)

for /f "tokens=1* delims= " %%i IN ("%CONSOLIDATED_OPTS%") DO (
if %%i == "" (
goto ENDDIRLOOP
) else (
set CONSOLIDATED_OPTS=%%j
GOTO DIRLOOP
)
)

:ENDDIRLOOP

Would it be possible to optimize above?

Environment

JBoss Enterprise Application Platform (EAP) 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content