In the pom.xml for a java project, I get missing artifact jdk.tools:jdk.tools:jar:1.6 error

后端 未结 7 882
执念已碎
执念已碎 2021-02-05 05:20

I think I know how to solve the problem except: I don\'t know where in the pom the specific version is referred to (I do not see it explicitly) and the solution I have seen is t

相关标签:
7条回答
  • 2021-02-05 06:24

    I finally tackled this the proper way.

    This happens when eclipse is launched with the JRE instead of the JDK as tools.jar isn't in the JRE. Based on that assertion, try installing the JDK. If it's already installed, check in your Path that you have the JDK path and not the JRE path.

    Be careful, the latest versions of java seems to add in the Path the following directory: C:\ProgramData\Oracle\Java\javapath. It contains shortcuts that may link to the JRE. You'll want to remove that and add in the link to your JDK bin folder. (e.g. C:\Program Files\Java\jdk1.8.0_66\bin)

    Note that you may need to restart your computer for the changes in the Path to be effective for the eclipse launch (I don't really understand why I had to but I did).

    Also note that Java updates will probably re-add the javapath to your PATH. So you may want not to use auto-updates but instead manually update your JDK and adapt your path after the install. It's a bit heavy but does the work.

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