A new daemon is always started on Java 8 #266 #260 #261

This commit is contained in:
Peter Palaga
2020-12-15 14:34:39 +01:00
parent 29c92d9e2c
commit 38b7185155
3 changed files with 8 additions and 2 deletions

View File

@@ -328,6 +328,7 @@ public class DaemonConnector {
}
Environment.MVND_HOME.addCommandLineOption(args, mvndHome.toString());
Environment.MVND_JAVA_HOME.addCommandLineOption(args, parameters.javaHome().toString());
Environment.LOGBACK_CONFIGURATION_FILE
.addCommandLineOption(args, parameters.logbackConfigurationPath().toString());
Environment.MVND_UID.addCommandLineOption(args, uid);

View File

@@ -224,7 +224,12 @@ public enum Environment {
/**
* Internal property to tell the daemon the width of the terminal
*/
MVND_TERMINAL_WIDTH("mvnd.terminalWidth", null, 0, OptionType.INTEGER, Flags.INTERNAL);
MVND_TERMINAL_WIDTH("mvnd.terminalWidth", null, 0, OptionType.INTEGER, Flags.INTERNAL),
/**
* Internal property to tell the daemon which JAVA_HOME was used to start it. It needs to be passed explicitly
* because the value may differ from what the daemon sees through <code>System.getProperty("java.home")</code>.
*/
MVND_JAVA_HOME("mvnd.java.home", null, null, OptionType.PATH, Flags.INTERNAL);
static Properties properties;

View File

@@ -132,7 +132,7 @@ public class Server implements AutoCloseable, Runnable {
}
long cur = System.currentTimeMillis();
info = new DaemonInfo(uid,
Environment.JAVA_HOME.asString(),
Environment.MVND_JAVA_HOME.asString(),
Environment.MVND_HOME.asString(),
DaemonRegistry.getProcessId(),
socket.socket().getLocalPort(),