-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't use system environment variable? #693
Comments
Environment properties are supported using an
|
gnodet
added
question
Further information is requested
waiting for feedback
Waiting for feedback
labels
Sep 30, 2022
yeah, can't read system env. but you can use that: // org.mvndaemon.mvnd.client.DaemonParameters#javaHome
public Path javaHome() {
final Path result = value(Environment.JAVA_HOME)
.orLocalProperty(provider, suppliedPropertiesPath())
.orLocalProperty(provider, localPropertiesPath())
.orLocalProperty(provider, userPropertiesPath())
.orLocalProperty(provider, globalPropertiesPath())
.orSystemProperty()
.orEnvironmentVariable()
.or(new ValueSource(
description -> description.append("java command"), DaemonParameters::javaHomeFromPath))
.orFail()
.cache(provider)
.asPath();
try {
return result.toRealPath();
} catch (IOException e) {
throw new RuntimeException("Could not get a real path from path " + result);
}
} remove config file , use SystemProperty : |
Closed
gnodet
added
bug
Something isn't working
and removed
question
Further information is requested
waiting for feedback
Waiting for feedback
labels
Jul 3, 2023
gnodet
added a commit
to gnodet/mvnd
that referenced
this issue
Jul 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
execute
mvnd clean
mvnd -version
,tip me 'Could not get a real path from path $JAVA_HOME'The text was updated successfully, but these errors were encountered: