Installing JDEE on Mac OS X
Frequently, Macusers that want to make use of the JDEE Java Development Environment for Emacs run into a small problem. Specifically, all the components of the install work fine except for attempts to compile a program (that would be 'C-c C-v C-c') when an error occurs that says... "Cannot find JDK's tools jar file. See jde-get-jdk-dir."
Most answers to this kind of a problem in the various fora are curt and RTFM-type answers that ask the user to look at the documentation for "jde-jdk" or "jde-get-jdk-dir". Obviously, this isn't very helpful...
This particular error is JDEE's way of saying "I can't find the JDK!" (Remember that the JDK is the java developer's kit that has the compiler, debugger, libraries, etc.) So we need to be able to tell JDEE where to find the JDK... sounds simple, right? Not that simple. JDEE can be pointed to the JDK in two ways: 1) setting the jde-jdk directory/registry/whatever in emacs or 2) setting the JAVA_HOME environment variable.
Obviously, I don't know jack about the first option... but I did manage to get a fix using the second option. Now, the JDK is more than just the commands 'javac' and 'java' so you can't solve the problem by simply adding,
setenv JAVA_HOME /usr/binin your ~/.tcshrc file. Feel free to try it (remember to 'source' your .tcshrc file).
Instead, add the following two lines to your .tcshrc file (you may need to poke around your system to find the exact path to the java goodies... put the first path below should be pretty close):
setenv JAVA_HOME "/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1" setenv JAVACMD $JAVA_HOME/home/bin/java
Source your .tchsrc file and everything should work great. Feel free to emal me (firstname.lastname@example.org) if you have suggestions for this page.