Skip to content

Commit

Permalink
JavaLocator Windows only simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
Fruchtzwerg94 committed May 9, 2024
1 parent 8dd1def commit a4a56df
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions PlantUmlViewer/PlantUmlViewer/Windows/JavaLocator.cs
Expand Up @@ -20,20 +20,11 @@ internal static class JavaLocator
public static string GetJavaExecutable()
{
string javaHome = GetJavaHome();
string javaExecutable;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
javaExecutable = Path.Combine(javaHome, "bin", "java.exe");
}
else
{
javaExecutable = Path.Combine(javaHome, "bin", "java");
}
string javaExecutable= Path.Combine(javaHome, "bin", "java.exe");
if (!File.Exists(javaExecutable))
{
throw new InvalidOperationException($"Java executable '{javaExecutable}' does not exist");
}

return javaExecutable;
}

Expand Down

0 comments on commit a4a56df

Please sign in to comment.