You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2021/07/25 12:23:00 UTC

[jira] [Comment Edited] (MNG-7195) Rework JAVA_HOME handling

    [ https://issues.apache.org/jira/browse/MNG-7195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17386882#comment-17386882 ] 

Michael Osipov edited comment on MNG-7195 at 7/25/21, 12:22 PM:
----------------------------------------------------------------

Maybe we should just drop {{JAVA_HOME}} discovery and test if it is there, if not use {{PATH}}?


was (Author: michael-o):
Maybe we should just drop {{JAVA_HOME}} discovery and test if it is there, if not use {{PATH}}.

> Rework JAVA_HOME handling
> -------------------------
>
>                 Key: MNG-7195
>                 URL: https://issues.apache.org/jira/browse/MNG-7195
>             Project: Maven
>          Issue Type: Task
>          Components: Command Line
>            Reporter: Michael Osipov
>            Priority: Major
>             Fix For: 4.0.x-candidate
>
>
> Coming from [here|https://issues.apache.org/jira/browse/MNG-7010?focusedCommentId=17386681&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17386681].
> [~rfscholte] says:
> It is not needed anymore to set JAVA_HOME.
> If it is set, %JAVA_HOME%/bin/java should be used to start Maven, otherwise java should be picked up from the PATH.
> This should be explained on the [install page|https://maven.apache.org/install.html].
> With this we can assume that JAVA_HOME was set on purpose, but misconfigured.
> I suggest to have a message like:
> {noformat}
> The JAVA_HOME environment variable is not defined correctly, so Apache Maven cannot be started.
> JAVA_HOME is set to "<actual value>", but "%JAVA_HOME%/bin/java" does not exist.
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)