At 07:49 PM 7/20/99 +0000, you wrote:
>I have a very reasonable understanding of Project files and a meger
>understanding of Emacs Lisp.
>I need to work with multiple JDKs depending on the projects I am working
>with. I know that I can set the project file up to switch between the JDK's
>provided I hardwire the path name to the JDK in the project file. What I
>would like is some way to make that more dynamic so that when I install a
>new version of the JDK all I have to do is redefine an environment variable
>and JDE would pick up on that. In particular, I was recently working with
>JDK1.2 and have just installed JDK1.2.2. All my project files had the
>compiler defined as "c:/jdk1.2/bin/javac". This, obviously, has to be
>changed.
>
>Instead of putting the string "javac" in the project file, could I put a
>reference to a ELisp function that would return the correct string? I could
>see a function like:

First put the following in your .emacs file.

>
>(defun jdk2 (a)
>
>     (concat (getenv "JDK2") a))
>



Then put the following code as the last thing in each of your prj.el files:

(jde-set-variables 
  (list 'jde-compiler (jdk2 "javac") t)
  (list 'jde-run-java-vm (jdk2 "java")
  (list 'jde-run-java-vm-w (jdk2 "javaw"))

What this does is override the default JDE setting for the jdk with your
own setting.

- Paul

>
>
>Where "JDK2" was an environment variable for the current JDK1.2
>installation. Then in the project file replacing the entry for "javac" with
>(jdk2 "javac") or the equivalent.
>
>Any suggestions on how to accomplish this?
>

This is a hack



>Erik Husby
>Domain Pharma Corp
>Suite 110           Vox: 781-778-3834
>10 Maguire Rd       Fax: 781-778-3800
>Lexington, MA 02421 Email: [EMAIL PROTECTED]
>

Reply via email to