Improve Sonic Java discovery beyond SonicHome\jre layouts.

Parse setenv scripts, search recursively under Sonic/MQ/ESB roots, and surface resolved SonicHome + java paths in the UI and full error lists.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-24 09:07:21 +02:00
co-authored by Cursor
parent ea6e760434
commit d1ef63f3f7
4 changed files with 886 additions and 100 deletions
@@ -127,12 +127,15 @@ public sealed class SonicConnection
return false;
}
/// <summary>Sonic-Installationsroot, z.B. "C:\Sonic\MQ10.0" (enthält lib\*.jar für MfApi).</summary>
/// <summary>
/// Sonic-/MQ-/ESB-Installationsroot, z.B. "C:\Sonic\MQ10.0" (Client-JARs oft unter lib).
/// Bei ESB-Home: ggf. MfClientLibPath auf MQ\lib setzen.
/// </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\…).
/// Leer = automatische Suche (JAVA_HOME/JRE_HOME, setenv.bat, rekursiv unter SonicHome, Registry, …).
/// </summary>
public string JavaHome { get; init; } = string.Empty;
@@ -143,7 +146,7 @@ public sealed class SonicConnection
/// <summary>
/// Optionaler Pfad zu Sonic-Client-JARs für MfApi (mgmt_client.jar etc.).
/// Leer = SonicHome\lib.
/// Leer = SonicHome\lib, MQ_HOME\lib, ESB_HOME\lib bzw. nested MQ*/lib.
/// </summary>
public string MfClientLibPath { get; init; } = string.Empty;