Relocate launcher classes
Create alternative launcher classes under the package `org.springframework.boot.loader.launch` and use them in favor of the previous location. This update is designed to improve compatibility with future changes in the loader. Closes gh-37667
This commit is contained in:
@@ -59,7 +59,7 @@ set CMD_LINE_ARGS=%$
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%SPRING_HOME%\lib\*
|
||||
"%JAVA_EXE%" %JAVA_OPTS% -cp "%CLASSPATH%" org.springframework.boot.loader.JarLauncher %CMD_LINE_ARGS%
|
||||
"%JAVA_EXE%" %JAVA_OPTS% -cp "%CLASSPATH%" org.springframework.boot.loader.launch.JarLauncher %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
@@ -115,4 +115,4 @@ if $cygwin; then
|
||||
fi
|
||||
|
||||
IFS=" " read -r -a javaOpts <<< "$JAVA_OPTS"
|
||||
exec "${JAVA_HOME}/bin/java" "${javaOpts[@]}" -cp "$CLASSPATH" org.springframework.boot.loader.JarLauncher "$@"
|
||||
exec "${JAVA_HOME}/bin/java" "${javaOpts[@]}" -cp "$CLASSPATH" org.springframework.boot.loader.launch.JarLauncher "$@"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,7 +33,7 @@ import org.springframework.boot.loader.tools.JavaExecutable;
|
||||
*/
|
||||
class ForkProcessCommand extends RunProcessCommand {
|
||||
|
||||
private static final String MAIN_CLASS = "org.springframework.boot.loader.JarLauncher";
|
||||
private static final String MAIN_CLASS = "org.springframework.boot.loader.launch.JarLauncher";
|
||||
|
||||
private final Command command;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user