fix(java): run Application and Spring Boot configs from the project root (#1475)

Configurations created for a main class, and the Spring Boot applications
detected in a module, set their working directory to the module directory.
A relative path in the VM options (such as --module-path=app/server/target/dependency)
then resolved against the module and the JVM failed to start. They now leave the
working directory empty, so the process starts in the project root, which is what
an empty working directory means elsewhere. The module is still stored separately
and keeps supplying the classpath and the debugger's sources.

Fixes #1197
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-05 13:55:34 +08:00
1 джерело 4557811ef8
коміт ee5d912157
5 files changed
+13 -12

No files matched your search

+2 -1
Переглянути файл
@@ -224,7 +224,8 @@ describe("application configurations", () => {
});
expect(applicationConfig({ className: "a.Tool" }, "m/src/test/java/a/Tool.java")).toMatchObject({
kind: "application",
cwd: "m",
module: "m",
cwd: null,
args: ["-cp", "${testClasspath}", "a.Tool"],
});
});