Fix MfApi Java discovery via SonicHome JRE and ship prebuilt tool.

MfApi restart/list no longer requires system JAVA_HOME or javac when Sonic ships a JRE and Tools/SonicMfContainerTool.jar is present.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-24 09:00:45 +02:00
co-authored by Cursor
parent 11941a45f5
commit ea6e760434
7 changed files with 400 additions and 40 deletions
@@ -130,6 +130,17 @@ public sealed class SonicConnection
/// <summary>Sonic-Installationsroot, z.B. "C:\Sonic\MQ10.0" (enthält lib\*.jar für MfApi).</summary>
public string SonicHome { get; init; } = @"C:\Sonic\MQ10.0";
/// <summary>
/// Optional: JRE/JDK-Home (z.B. C:\Sonic\MQ10.0\jre) oder Pfad zu java.exe.
/// Leer = automatische Suche (JAVA_HOME, PATH, SonicHome\jre, Program Files\…).
/// </summary>
public string JavaHome { get; init; } = string.Empty;
/// <summary>
/// Optionaler direkter Pfad zu java.exe (überschreibt JavaHome wenn gesetzt).
/// </summary>
public string JavaPath { get; init; } = string.Empty;
/// <summary>
/// Optionaler Pfad zu Sonic-Client-JARs für MfApi (mgmt_client.jar etc.).
/// Leer = SonicHome\lib.