imbennie opened a new issue, #619: URL: https://github.com/apache/maven-mvnd/issues/619
This problem seems like #156 but has a little difference. I had SDKMAN in my Cygiwn and have several java versions installed. So Cygwin has its own `JAVA_HOME`. ``` ~ » echo $JAVA_HOME /home/Bennie/.sdkman/candidates/java/current ``` And when i checkout mvnd version ``` ~ » mvnd -v mvnd native client 0.7.1-windows-amd64 (97c587c11383a67b5bd0ff8388bd94c694b91c1e) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Exception in thread "main" java.lang.RuntimeException: Could not get a real path from path \home\Bennie\.sdkman\candidates\java\current at org.mvndaemon.mvnd.client.DaemonParameters.javaHome(DaemonParameters.java:144) 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) ``` That's the problem what is. I'm trying `mvnd -v` agin after edit `java.home` in the `conf/mvnd.properties` with following, But still got the same error output before. ``` java.home=/home/Bennie/.sdkman/candidates/java/8.0.322-tem ``` After read the #156 I find out maybe the @gnodet doesn't have a `JAVA_HOME` in Cygwin itself which just copied from Windows one. Thus I unset the JAVA_HOME and ran `mvnd -v` agin. ``` ~ » unset JAVA_HOME ~ » mvnd -v mvnd native client 0.7.1-windows-amd64 (97c587c11383a67b5bd0ff8388bd94c694b91c1e) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Exception in thread "main" java.lang.RuntimeException: Could not get a real path from path \home\Bennie\.sdkman\candidates\java\8.0.322-tem at org.mvndaemon.mvnd.client.DaemonParameters.javaHome(DaemonParameters.java:144) 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) ``` This time the `java.home` path in output is point to our's one. Verified that the `unset JAVA_HOME` operation is valid. But the problem still does what it does. I checked out the #156 bug-fixed details. Found out the `java.home` path start with `\cygdrive\`, So edit `java.home` in the `conf/mvnd.properties` again. Then It's just worked. ``` java.home=/cygdrive/d/Tools/cygwin/home/Bennie/.sdkman/candidates/java/8.0.322-tem ~ » mvnd -v mvnd native client 0.7.1-windows-amd64 (97c587c11383a67b5bd0ff8388bd94c694b91c1e) Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739) Maven home: D:\Tools\cygwin\home\Bennie\.sdkman\candidates\mvnd\0.7.1\mvn Java version: 1.8.0_322, vendor: Temurin, runtime: D:\Tools\cygwin\home\Bennie\.sdkman\candidates\java\8.0.322-tem\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" ``` Finally: 1. Is there a good way to solve this problem? 2. This is may be a bug? due the `java.home` property override by `$JAVA_HOME`. -- 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.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org