Alex Rivera | Logout

How do you address the issue of a missing tools.jar in a JDK in Mac OS X?

Asked 2011-04-11T02:48:35.723
14

From my searching, I found supporting information here: Java Development Guide for Mac OS X

tools.jar does not exist. Classes usually located here are instead included in classes.jar. Scripts that rely on the existence of tools.jar need to be rewritten accordingly.

If a rewrite is inevitable, how does that go?

This problem was encountered while deploying on Tomcat 6 installed via MacPorts on a Mac OS X 10.6 machine.

Edit
Report

1 Answer

0

Edit to Bruno's answer which was finally what worked for me after quite a bit of maven trial and error.

If you are using 1.7 then you should be able to change revision to 1.7. I do not know if this is still a problem in Java 1.7 though.

sudo sh -c '$(j_home=$(/usr/libexec/java_home -v 1.6) && ln -sf ${j_home}/../Classes/classes.jar ${j_home}/../Classes/tools.jar && ln -sf ${j_home}/../Classes ${j_home}/../lib)'
answered 2013-06-03T18:07:05.913

Your Answer