When mac OS uses maven to warn Workspace defines a VM that does not cont

Source: Internet
Author: User

When using maven to execute mvn eclipse in mac OS: eclipse, you can see a warning message in the log output on the command line to see the solution.

When using maven to execute mvn eclipse: eclipse in mac OS, a warning message is displayed in the log output on the command line. The information is as follows:

The Code is as follows: Copy code

[WARNING] Workspace defines a VM that does not contain a valid jre/lib/rt. jar:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

The reason is that there is no rt in mac OS. jar file, with classes. the complete path of jar is/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes. jar, know the cause, it is easy to solve this problem, just need to make a soft link, the operation is as follows:

The Code is as follows: Copy code
Cd/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Sudo mkdir-p jre/lib
Sudo ln-s/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes. jar jre/lib/rt. jar

If you are a root user, you can omit

The Code is as follows: Copy code
"Sudo"

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.