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" |