Proguard on MacOSX

[proguard] Error: Can't read [/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/rt.jar] (No such file or directory)

Similarly, you can also get the following error:

[proguard] Error: Can't read [/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jsse.jar] (No such file or directory)

That happens because the Java bundled with MacOSX doesn’t provide a standard library configuration, that is the rt.jar has been moved (as well as the jsse.jar library) and even renamed. To fix the issue simply symlink jsse.jar and symlink rt.jar to the corresponding classes.jar file:

localhost:~ root# cd /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/
localhost:lib root# ln -s ../../Classes/classes.jar rt.jar
localhost:lib root# ln -s ../../Classes/jsse.jar .

猜你喜欢

转载自tonyking2010.iteye.com/blog/1965294