Attempt to find Java's binary to use for the self updater on Windows

This commit is contained in:
coolGi
2023-10-13 02:00:12 +10:30
parent 2bf997e882
commit ae65fb8e93
@@ -311,9 +311,13 @@ public class SelfUpdater
}
else
{
// Gets the Java binary
String javaHome = System.getProperty("java.home");
String javaBin = javaHome + File.separator + "bin" + File.separator + "java";
// Execute the new jar, to delete the old jar once it detects the lock has been lifted
Runtime.getRuntime().exec(
"java -cp "+
javaBin +" -cp "+
newFileLocation.getAbsolutePath()
+" "+
DeleteOnUnlock.class.getCanonicalName()