Missing artifact com. Sun: Tools: jar: 1.5.0

Source: Internet
Author: User
Specify the reference directly in pom.
<! -- The tool. Jar cannot be found after Struts-core is imported. --><dependency><groupId>com.sun</groupId><artifactId>tools</artifactId><version>1.5.0</version><scope>system</scope><systemPath>${JAVA_HOME}/lib/tools.jar</systemPath></dependency>
If the system environment variable java_home is not configured, you must configure it in advance. The advantage is that JDK can be directly used as long as the client is configured. You can also specify the JDK installation directory.
<properties>      <java.home>D:/Java/jdk1.6.0_43</java.home></properties>
Replace $ {java_home} with $ {java. Home. This java. Home is a variable defined in Maven. The bad thing about this method is that if the machine is changed, the JDK location cannot be guaranteed.
Another method is to copy the tools. jar file under JDK to the project, and then specify. This method is not limited by machines.

Missing artifact com. Sun: Tools: jar: 1.5.0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.