tags:

views:

22

answers:

2

Hello fellow java developers,

I'm trying to obfuscate my java code, and proguard requires that i reference a java library

by default that library is rt.jar, but rt.jar does not exist in my java directory!

I tried referencing dt.jar, but it doesn't seem to have fixed the problem

any ideas?

A: 

rt.jar is the java runtime. It contains all the java.* goodies that you call throughout your code. You'll find it in the directory where Java is installed.

Edit: Doesn't exist on OS X apparently, look for classes.jar instead

@Apple -1 for being difficult

CurtainDog
A: 

Under Mac OS X at least, the runtime is no longer packaged under rt.jar (instead it's called classes.jar).

You can find the location of the runtime jar by running any Java program with the VM in verbose mode and grepping for the java.lang.String class:

cristi:tmp diciu$ java -verbose test | grep "java.lang.String"
[Loaded java.lang.String from /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar]
diciu