I am trying to configure JDEE for emacs 24 on OS X.
When I create a .java file, the environment seems to be loaded automatically (please see picture), so it seems to be installed correctly. However, when I try to auto complete anything using M-x jde-complete
(I haven't bound this to any keys yet) I get the following message:
Cannot find JDK's tools jar file (or equivalent).Type M-x describe-function [RET] jde-get-jdk-dir for more info.
I ran /usr/libexec/java_home to find my Java home and set this in my ~/.bash_profile:
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home"
I then configured JDEE to point on JDK in ~/.emacs:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(jde-jdk (quote ("1.7.0_17")))
'(jde-jdk-registry (quote (("1.7.0_17" . "/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home")))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
Can anyone tell me why auto completion is not working? I believe that no parts of my JDEE i setup is currently working, however, I use auto completion to test as this is my main prority to get working.
Update: If I use M-x jde-compile it says
The JDE does not recognize JDK 1.7 javac. Assume JDK 1.6 javac?(yes or no)
It seems that it finds my JDK. If I type yes it will give the same error (Cannot find JDK's tools jar file (or equivalent).


I followed this guide and now it works. I think they key was to add two JDKs and then select the one you wish to use. It seems like JDEE may not work with only one JDK added. However, now I get the error "Can not put GUI menu on this terminal" but I guess that's another question.