Skip to content
Snippets Groups Projects
Commit 7788cb73 authored by Sergiu Dumitriu's avatar Sergiu Dumitriu
Browse files

XWIKI-10646: Make the standalone debug script start in Windows even if...

XWIKI-10646: Make the standalone debug script start in Windows even if JAVA_HOME is not defined and Java is not on the PATH
Done.
parent 2c13e48e
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,11 @@ if "%2"=="profiler" (
set JAVA_TOOL_OPTIONS=-agentlib:yjpagent
)
REM Get javaw.exe from the latest properly installed JRE
for /f tokens^=2^ delims^=^" %%i in ('reg query HKEY_CLASSES_ROOT\jarfile\shell\open\command /ve') do set JAVAW_PATH=%%i
set JAVA_PATH=%JAVAW_PATH:\javaw.exe=%\java.exe
if "%JAVA_PATH%"=="" set JAVA_PATH=java
REM Location where XWiki stores generated data and where database files are.
set XWIKI_DATA_DIR=${xwikiDataDir}
set XWIKI_OPTS=%XWIKI_OPTS% -Dxwiki.data.dir=%XWIKI_DATA_DIR%
......@@ -91,7 +96,7 @@ REM Note that setting this value too high can leave your server vulnerable to de
REM service attacks.
set XWIKI_OPTS=%XWIKI_OPTS% -Dorg.eclipse.jetty.server.Request.maxFormContentSize=1000000
java %XWIKI_OPTS% %4 %5 %6 %7 %8 %9 -jar %JETTY_HOME%/start.jar
"%JAVA_PATH%" %XWIKI_OPTS% %4 %5 %6 %7 %8 %9 -jar %JETTY_HOME%/start.jar
if %2==profiler set PATH=%OLD_PATH%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment