Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 697
Nikki Erwin Ramirez Avatar asked Apr 11 '11 02:04

Nikki Erwin Ramirez


1 Answers

Here is my tested solution, which implies no change in maven config, just add symbolic links:

  • ln -s /Library/Java/JavaVirtualMachines/1.6.0_38-b04-436.jdk/Contents/Home/../Classes/classes.jar /Library/Java/JavaVirtualMachines/1.6.0_38-b04-436.jdk/Contents/Home/../Classes/tools.jar
  • ln -s /Library/Java/JavaVirtualMachines/1.6.0_38-b04-436.jdk/Contents/Home/../Classes /Library/Java/JavaVirtualMachines/1.6.0_38-b04-436.jdk/Contents/Home/../lib

Enjoy! Bruno

like image 148
Bruno Jullien Avatar answered Oct 06 '22 17:10

Bruno Jullien