Hi, I'm using AntServer. In the last few weeks, I frequently received the following error message when I tried to build my project:
You need ant.jar in the beanshell classpath. The beanshell uses jde-global-classpath or the environment variable CLASSPATH. I could figure out, that it occurs when beanshell is started before jde-ant has been loaded. This happens when I try to build the project after compiling a single file of this project. If jde-ant-home is not bound when beanshell starts, ant.jar will not be added to beanshell's classpath. I've modified my local beanshell.el to fix the problem: (defun bsh-internal (&optional display-buffer) (let ((bsh-buffer-name "*bsh*")) (if (not (comint-check-proc bsh-buffer-name)) (let* ((bsh-buffer (get-buffer-create bsh-buffer-name)) ;; ----------------------------------------------------------------------------------------- ;; (ant-home (if (boundp 'jde-ant-home) ;; (if (string= jde-ant-home "") (getenv "ANT_HOME") ;; jde-ant-home))) ;; MS: (project-ant-home (jde-get-project 'jde-ant-home jde-current-project)) (ant-home (if (and (boundp 'jde-ant-home) (not (string= jde-ant-home ""))) ;; jde-ant loaded jde-ant-home (if (and project-ant-home (not (string= project-ant-home ""))) ;; jde-ant not loaded but jde-ant-home set in project file project-ant-home ;; jde-ant-home not set in project file and not customized (getenv "ANT_HOME")))) ;; ----------------------------------------------------------------------------------------- (jde-java-directory I'm absolutly not sure whether this is the best or even a good solution. But it seems to work and I hope it helps Paul or Javier to fix the problem. I would like to mention two things related with this problem: - AntServer.java is not part of the distribution. Is it intentionally omitted? - The error message given by AntServer should mention jde-ant-home and ANT_HOME. Finally, I would like to say, that I'm already using JDE for a couple of years and I'm really happy with it. Martin