![]() Therefore, it's possible to configure JAVA_HOME to point to a JRE installation, hiding this particular error and causing problems at a later stage. While the JRE's main purpose is to run Java code, the JDK can also compile and debug among other important differences. This check may seem reasonable at first glance, but we have to consider that both JDK and JRE have a bin folder and both contain an executable java file. Here is the mvn executable check for Linux (Apache Maven v3.5.4): if thenĮcho "The JAVA_HOME environment variable is not defined correctly" >&2Įcho "This environment variable is needed to run this program" >&2Įcho "NB: JAVA_HOME should point to a JDK not a JRE" >&2 ![]() Follow these steps: On a Mac, click Eclipse > Preferences on the menu. ![]() ![]() Set the appropriate Tomcat Installation Directory by clicking Browse and choosing the tomcat directory. Adding a new JRE in Eclipse is pretty straight forward. If the executable is not found, Maven terminates with the error. Try the following steps: Go to Window -> Preferences -> Server -> Runtime Environments Under Server Runtime Environments, select the server configuration which is throwing the error and click on Edit. How does Maven verify the JAVA_HOME path?īefore running any goals, Maven checks for the existence of the java command in the path specified by JAVA_HOME or by asking the OS for a default JDK installation.
0 Comments
Leave a Reply. |