Running ProGuard on OS X: Where is Apple's equivalent to the rt.jar?

It is called classes.jar and it is under /System/Library/Frameworks/JavaVM.framework/Classes

Look here for details:

http://lists.apple.com/archives/java-dev/2003/Mar/msg01530.html


This blog entry describes a relatively straight-forward way to resolve the issue without modifying the Proguard configuration.

The entry recommends that two symbolic links are created, so that rt.jar and jsse.jar exist in the path that Proguard expects them to.

Standing in the /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib directory and running the following commands resolved the problem for me:

sudo ln -s ../../Classes/classes.jar rt.jar
sudo ln -s ../../Classes/jsse.jar .

There's some explanation of how to get to the rt.jar equivalent in the What should I set JAVA_HOME to on OSX question.

The short answer is to use the result of /usr/libexec/java_home or to set JAVA_HOME to $(/usr/libexec/java_home) and then find classes.jar (the OS X equivalent of rt.jar) at JAVA_HOME/bundle/Classes/classes.jar