jglick commented on issue #608: URL: https://github.com/apache/maven-mvnd/issues/608#issuecomment-1075174657
That returns `6024@DESKTOP-87…V`. More specifically ``` >echo Integer.parseInt(java.lang.management.ManagementFactory.getRuntimeMXBean().getName().split("@", 0)[0]) | jshell | Welcome to JShell -- Version 11.0.13 | For an introduction type: /help intro jshell> Integer.parseInt(java.lang.management.ManagementFactory.getRuntimeMXBean().getName().split("@", 0)[0])$1 ==> 6372 ``` Yet https://github.com/apache/maven-mvnd/blob/97c587c11383a67b5bd0ff8388bd94c694b91c1e/common/src/main/java/org/mvndaemon/mvnd/common/DaemonRegistry.java#L283-L290 fails when run from mvnd. It is difficult to confirm the JVM being used by `mvnd` because this error crashes it before it gets as far as printing the JVM information. Perhaps noteworthy is that when I run `mvnd` from the `C` drive (where I guess Java is installed; via `choco` so did not pay much attention) I get a different error ``` C:\>mvnd -version mvnd native client 0.7.1-windows-amd64 (97c587c11383a67b5bd0ff8388bd94c694b91c1e) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Exception in thread "main" java.lang.IllegalStateException: Could not get value for Environment.JAVA_HOME from any of the following sources: value: java.home, environment variable JAVA_HOME, property java.home in C:\Users\…\.mvn\mvnd.properties, property java.home in C:\Users\…\.m2\mvnd.properties, property java.home in C:\Program Files\mvndaemon\mvnd-0.7.1-windows-amd64\conf\mvnd.properties, system property java.home at org.mvndaemon.mvnd.client.DaemonParameters$EnvValue.couldNotgetValue(DaemonParameters.java:596) at org.mvndaemon.mvnd.client.DaemonParameters$EnvValue.lambda$orFail$8(DaemonParameters.java:573) at org.mvndaemon.mvnd.client.DaemonParameters$EnvValue.get(DaemonParameters.java:606) at org.mvndaemon.mvnd.client.DaemonParameters$EnvValue.asPath(DaemonParameters.java:629) at org.mvndaemon.mvnd.client.DaemonParameters.javaHome(DaemonParameters.java:140) at org.mvndaemon.mvnd.client.DaemonConnector.connect(DaemonConnector.java:99) at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:272) at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:118) ``` The error from `DaemonRegistry` is only printed when running from another drive, which is mapped to a Linux filesystem. I think the problem is that `\proc\self` _does_ exist but we should not be consulting it. I will try to offer a patch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org