From cb66491b496c55805f98c7f5f55a1bc141da1dc9 Mon Sep 17 00:00:00 2001 From: ailegion Date: Mon, 28 Sep 2026 12:45:03 +0200 Subject: [PATCH] Fix Windows launcher (rosetta.bat) - Escape the backslash in the drivers path (`\\drivers`) so the Windows script renders completely. - Add every driver jar to the classpath, not only the last one. - Quote the classpath so paths with spaces work. --- binary/src/main/resources/windows_template.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/binary/src/main/resources/windows_template.txt b/binary/src/main/resources/windows_template.txt index 0e73090a..97c5de92 100644 --- a/binary/src/main/resources/windows_template.txt +++ b/binary/src/main/resources/windows_template.txt @@ -54,7 +54,7 @@ set CLASSPATH=%APP_HOME:"=%/lib/* set "DRIVERS_PATH=%ROSETTA_DRIVERS%" if "%ROSETTA_DRIVERS%"=="" ( - set "DRIVERS_PATH=%APP_HOME%\drivers" + set "DRIVERS_PATH=%APP_HOME%\\drivers" ) if not exist "%DRIVERS_PATH%" ( @@ -62,7 +62,7 @@ if not exist "%DRIVERS_PATH%" ( ) for /R "%DRIVERS_PATH%" %%f in (*.jar) do ( - set CLASSPATH=%CLASSPATH%;%%f + call set "CLASSPATH=%%CLASSPATH%%;%%f" ) <% if ( System.properties['BADASS_CDS_ARCHIVE_FILE_WINDOWS'] ) { %> @@ -72,7 +72,7 @@ if exist %CDS_ARCHIVE_FILE% set CDS_JVM_OPTS=-XX:SharedArchiveFile=%CDS_ARCHIVE_ <% } %> @rem Execute ${applicationName} -<% if ( System.properties['BADASS_RUN_IN_BIN_DIR'] ) { %>pushd %DIRNAME% & <% } %>%JAVA_EXE% %DEFAULT_JVM_OPTS% %CDS_JVM_OPTS% %JAVA_OPTS% %${optsEnvironmentVar}% -Djdk.tls.client.protocols=TLSv1.2 <% if ( appNameSystemProperty ) { %>"-D${appNameSystemProperty}=%APP_BASE_NAME%"<% } %> -classpath %CLASSPATH% ${mainClassName} %CMD_LINE_ARGS%<% if ( System.properties['BADASS_RUN_IN_BIN_DIR'] ) { %> & popd<% } %> +<% if ( System.properties['BADASS_RUN_IN_BIN_DIR'] ) { %>pushd %DIRNAME% & <% } %>%JAVA_EXE% %DEFAULT_JVM_OPTS% %CDS_JVM_OPTS% %JAVA_OPTS% %${optsEnvironmentVar}% -Djdk.tls.client.protocols=TLSv1.2 <% if ( appNameSystemProperty ) { %>"-D${appNameSystemProperty}=%APP_BASE_NAME%"<% } %> -classpath "%CLASSPATH%" ${mainClassName} %CMD_LINE_ARGS%<% if ( System.properties['BADASS_RUN_IN_BIN_DIR'] ) { %> & popd<% } %> :end @rem End local scope for the variables with windows NT shell