fixes for linux

This commit is contained in:
2025-04-07 06:18:22 +05:00
parent cbfd5f8da8
commit 5e439ee8d5
3 changed files with 16 additions and 11 deletions

View File

@@ -40,14 +40,17 @@ public static class PathHelper
public static IOPath GetJavaBinDir(string id) =>
Path.Concat(GetJavaRuntimeDir(id), "bin");
public static IOPath GetJavaExecutablePath(string id, bool debug)
public static IOPath GetJavaExecutablePath(string id, bool redirectOutput)
{
string executable_name = "java";
if (debug)
executable_name += "w";
if (!redirectOutput)
executable_name = "javaw";
if(OperatingSystem.IsWindows())
executable_name += ".exe";
return Path.Concat(GetJavaBinDir(id), executable_name);
var path = Path.Concat(GetJavaBinDir(id), executable_name);
if(!redirectOutput && !File.Exists(path))
return GetJavaExecutablePath(id, true);
return path;
}
public static string GetLog4jConfigFileName() => "log4j.xml";