mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] ServerWrapperSetup javaw.exe
This commit is contained in:
parent
559f4f4de7
commit
81a94faaf6
2 changed files with 6 additions and 2 deletions
|
@ -430,11 +430,15 @@ public static Path resolveIncremental(Path dir, String name, String extension) {
|
|||
}
|
||||
|
||||
public static Path resolveJavaBin(Path javaDir) {
|
||||
return resolveJavaBin(javaDir, false);
|
||||
}
|
||||
|
||||
public static Path resolveJavaBin(Path javaDir, boolean isConsole) {
|
||||
// Get Java binaries path
|
||||
Path javaBinDir = (javaDir == null ? JVM_DIR : javaDir).resolve("bin");
|
||||
|
||||
// Verify has "javaw.exe" file
|
||||
if (!LogHelper.isDebugEnabled()) {
|
||||
if (!isConsole && !LogHelper.isDebugEnabled()) {
|
||||
Path javawExe = javaBinDir.resolve("javaw.exe");
|
||||
if (isFile(javawExe))
|
||||
return javawExe;
|
||||
|
|
|
@ -100,7 +100,7 @@ public void run() throws Exception {
|
|||
writer.append("#!/bin/bash\n\n");
|
||||
}
|
||||
writer.append("\"");
|
||||
writer.append(IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home"))).toAbsolutePath().toString());
|
||||
writer.append(IOHelper.resolveJavaBin(Paths.get(System.getProperty("java.home")), true).toAbsolutePath().toString());
|
||||
writer.append("\" ");
|
||||
if (mainClassName.contains("bungee")) {
|
||||
LogHelper.info("Found BungeeCord mainclass. Modules dir change to modules_srv");
|
||||
|
|
Loading…
Reference in a new issue