Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDEX-3052 Allow to find Java in Windows Registry if not defined #47

Merged
merged 1 commit into from
Sep 14, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions assembly-sdk/src/assembly/bin/setenv.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
@echo off
set CHE_LOCAL_CONF_DIR=%CATALINA_HOME%\conf\

if not "%JAVA_HOME%"=="" goto javaHomeAlreadyDefined

FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment" /v CurrentVersion') DO set CurVer=%%B
FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment\%CurVer%" /v JavaHome') DO set JAVA_HOME=%%B

:javaHomeAlreadyDefined

if "%JAVA_OPTS%"=="" (set JAVA_OPTS=-Xms256m -Xmx1048m -XX:MaxPermSize=256m -server)

if "%CHE_LOGS_DIR%"=="" (set CHE_LOGS_DIR=%CATALINA_HOME%\logs)
Expand Down