Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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:

enter image description here

like image 210
JohnPristine Avatar asked Oct 08 '11 14:10

JohnPristine


2 Answers

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.

like image 90
TraderJoeChicago Avatar answered Nov 03 '22 00:11

TraderJoeChicago


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
like image 28
Jason Thrasher Avatar answered Nov 02 '22 23:11

Jason Thrasher