Skip to content

Commit

Permalink
fix(package): properly select the embedded jre location when...
Browse files Browse the repository at this point in the history
...running on Windows
  • Loading branch information
cmark committed Sep 12, 2023
1 parent bc9a856 commit 37f20dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ set SCRIPT_DIR=%~dp0
rem Derive KERNEL_HOME full path from script's parent (no backslash)
for %%I in ("%SCRIPT_DIR%..") do set KERNEL_HOME="%%~fsI"

set CONFIG_AREA=%KERNEL_HOME%/work
set CONFIG_AREA=%KERNEL_HOME%\work

IF DEFINED JAVA_HOME (
set JAVA_EXECUTABLE=%JAVA_HOME%/bin/java.exe
set JAVA_EXECUTABLE=%JAVA_HOME%\bin\java.exe
) else (
set JAVA_EXECUTABLE=%KERNEL_HOME%/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.*/jre/bin/java.exe
for /D %%D in ("%KERNEL_HOME%\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.*") do (
set JAVA_EXECUTABLE="%%~D\jre\bin\java.exe"
)
)

REM Heap settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ set SCRIPT_DIR=%~dp0
rem Derive KERNEL_HOME full path from script's parent (no backslash)
for %%I in ("%SCRIPT_DIR%..") do set KERNEL_HOME=%%~fsI

set CONFIG_AREA=%KERNEL_HOME%/work
set CONFIG_AREA=%KERNEL_HOME%\work

IF DEFINED JAVA_HOME (
set JAVA_EXECUTABLE=%JAVA_HOME%/bin/java.exe
set JAVA_EXECUTABLE=%JAVA_HOME%\bin\java.exe
) else (
set JAVA_EXECUTABLE=%KERNEL_HOME%/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.*/jre/bin/java.exe
for /D %%D in ("%KERNEL_HOME%\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.*") do (
set JAVA_EXECUTABLE="%%~D\jre\bin\java.exe"
)
)

REM Heap settings
Expand Down

1 comment on commit 37f20dc

@apeteri
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.