Reputation: 3172
I'm compiling DrJava by following these instructions.
But when I run ant jar
, I get the error:
/Users/arthur/dj/drjava/build.xml:1270: Can't find rt.jar in the Java 7 home: ${env.JAVA7_HOME}
I know that rt.jar
is in /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib
.
How do I fix it?
Upvotes: 1
Views: 6806
Reputation: 99
I ran into this same problem. Pulak was close, but not quite right: you don't need the jre/lib
part at the end. The command that ultimately did the trick for me was:
export JAVA7_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/
Upvotes: 0
Reputation: 2481
This answer is same as what others have provided - just a little more detailed. So what you simply need is type this on your shell:
export JAVA7_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib
Now you have mentioned I know that rt.jar is in /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib.
Usually you would not have Contents/Home
inside JDK. A standard Java installation should have jdk1.7.0_07.jdk/jre/lib
. Check if you have provided the correct path above and rt.jar is indeed in there.
Upvotes: 3