From 37f20dcab77dbec20c61cbe23156f7d3d079b2d3 Mon Sep 17 00:00:00 2001 From: Mark Czotter Date: Tue, 12 Sep 2023 09:40:30 +0200 Subject: [PATCH] fix(package): properly select the embedded jre location when... ...running on Windows --- .../assembly/common/bin/cis.bat | 8 +++++--- .../assembly/common/bin/snowowl.bat | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/cis/com.b2international.snowowl.snomed.cis.product/assembly/common/bin/cis.bat b/cis/com.b2international.snowowl.snomed.cis.product/assembly/common/bin/cis.bat index 71163c74e47..812d47149bd 100644 --- a/cis/com.b2international.snowowl.snomed.cis.product/assembly/common/bin/cis.bat +++ b/cis/com.b2international.snowowl.snomed.cis.product/assembly/common/bin/cis.bat @@ -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 diff --git a/releng/com.b2international.snowowl.server.update/assembly/common/bin/snowowl.bat b/releng/com.b2international.snowowl.server.update/assembly/common/bin/snowowl.bat index cea8ef1a54e..2af3475c613 100644 --- a/releng/com.b2international.snowowl.server.update/assembly/common/bin/snowowl.bat +++ b/releng/com.b2international.snowowl.server.update/assembly/common/bin/snowowl.bat @@ -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