$> sudo ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/tools.jar
$> sudo ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/lib
Problem solved!
“Life moves pretty fast. You don’t stop and look around once in a while, you could miss it.” – Ferris Bueller
Wednesday, April 10, 2013
Simple fix to missing tools.jar in JDK on Mac OS X
Today I ran into a situation where a 3rd-party pom.xml had a dependency on tools.jar. I'm stuck using Java 6, due to project requirements, which means I have to use the Apple supplied JDK. The problem is Apple bundled all the classes normally found in tools.tar into classes.jar. Since I couldn't modify the pom file, I simply creating a symbolic link to classes.jar.
Subscribe to:
Post Comments (Atom)
That is ok if you are a single dev. But it is a pain on a multi-dev team with multiple build machines. Will look around for a better solution and if I find it will post it here.
ReplyDeleteWhat a pain.
ReplyDeleteHere is a solution that works for me with out having to have a manual step. It is detailed on this page
http://permalink.gmane.org/gmane.comp.java.maven-plugins.mojo.user/4320
look under
On Fri, Oct 18, 2013 at 2:32 PM, David Hay enstratius.com> wrote:
This is not pretty though!
This caused errors when compiling on mac os x: Fatal error compiling: Prohibited package name: java.lang
ReplyDeleteChanged the JAVA_HOME to jdk1.7 path, on mac os x:
ReplyDelete/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home
mvn clean install worked fine after this.
Thanks and that i have a neat present: How To Renovate House Exterior top home improvement companies
ReplyDelete