Maven not picking JAVA_HOME correctly

后端 未结 8 1520
日久生厌
日久生厌 2020-12-03 02:35

I am on windows environment and using maven to compile my project. Although I just created the project and added the dependencies for various libararies.

As I added

相关标签:
8条回答
  • 2020-12-03 03:31

    When you add the JAVA_HOME environment variable, if there are spaces in the path you must wrap the whole thing in quotes.

    0 讨论(0)
  • 2020-12-03 03:31

    Maven ${java.home} property is set and taken from different places depending your Eclipse execution:

    • from the default JRE selected for the workspace

      Window>Preferences>Java>Installed JREs

    • from the specific Eclipse project,

      Java Build Path>Libraries>JRE System Library

    • from the Run configuration.

      Run Configurations> Specific Run Configuration > JRE

    Remember your JRE home paths points to a JDK or JRE under JDK

    0 讨论(0)
提交回复
热议问题