Avoid Java21 jar; prefer version-checked Java8 class files.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-24 09:34:24 +02:00
co-authored by Cursor
parent 368733a4fd
commit 5f216badca
2 changed files with 2 additions and 11 deletions
@@ -335,17 +335,8 @@ public sealed class SonicMfApiExecutor
continue; continue;
} }
string jar = Path.Combine(dir, "SonicMfContainerTool.jar"); // JAR absichtlich nicht blind nutzen oft noch mit Java 21 gebaut.
if (File.Exists(jar)) // Nur .class mit geprüftem major<=runtimeMajor.
{
// JAR ohne Version-Check nur wenn Runtime >= 52; bei Unsicherheit neu kompilieren.
if (runtimeMajor >= 52)
{
workDir = dir;
classpathEntry = jar;
return true;
}
}
} }
error ??= "Tools\\SonicMfContainerTool.class (Java 8) nicht gefunden."; error ??= "Tools\\SonicMfContainerTool.class (Java 8) nicht gefunden.";