Maven warning on MacOS: Workspace defines a VM that does not contain a valid jre/lib/rt.jar

坚强是说给别人听的谎言 提交于 2019-12-08 16:51:25

问题


I am trying to clean my Maven and I am getting this warning when I run mvn eclipse:eclipse -Dwtpversion=2.0

[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

Does any one have a clue on how to fix it?

I am on MacOS. Here is what I have configured for my eclipse:


回答1:


There is a patch here, but it has not been applied to any release so far. :-( As a workaround you can create a symlink as described here.




回答2:


The answer above works, but seems to be more than what's needed.

Minimally on OSX Lion, you may get by with:

cd /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
sudo mkdir -p jre/lib
cd jre/lib
sudo ln -s ../../../Classes/classes.jar rt.jar


来源:https://stackoverflow.com/questions/7697387/maven-warning-on-macos-workspace-defines-a-vm-that-does-not-contain-a-valid-jre

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!