Build self-contained Windows JAR release

This commit is contained in:
张家训
2026-08-03 15:37:06 +08:00
parent 516989b8e6
commit f0950429a6
4 changed files with 121 additions and 229 deletions
+21
View File
@@ -0,0 +1,21 @@
@echo off
chcp 65001 >nul
setlocal
cd /d "%~dp0"
set "JAVA_BIN=%~dp0runtime\bin\java.exe"
set "APP_JAR=%~dp0@APP_JAR@"
if not exist "%JAVA_BIN%" (
echo [ERROR] Bundled Java runtime is missing: %JAVA_BIN%
pause
exit /b 1
)
if not exist "%APP_JAR%" (
echo [ERROR] WorkUtils JAR is missing: %APP_JAR%
pause
exit /b 1
)
"%JAVA_BIN%" -Dfile.encoding=UTF-8 "-Dworkutils.home=%~dp0" -jar "%APP_JAR%" %*
if errorlevel 1 pause