Olle Sundblad wrote:
> Hi
>
> Maybe this should go to the delvelopers list?
>
> I just noticed that when I set "Jde Compile Option Directory" to:
>
> c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes
> or
> "c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes"
>
> I get the following error (because of the spaces allowed in/required by
> Windows):
>
> output:
> cd c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/src/
> javac -classpath "c:/Program Files/Apache Tomcat
> 4.0/common/lib/servlet.jar;c:/Program Files/Apache Tomcat
> 4.0/common/lib/tools.jar" -d c:/Program Files/Apache Tomcat
> 4.0/webapps/cid/WEB-INF/classes -g -target 1.2 TestApp.java
> javac: invalid argument: Files/Apache
> Usage: javac <options> <source files>
>
> I can get it to compile when by setting "Jde Compile Option Directory" to:
>
> \"c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes\"
>
> output:
> cd c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/src/
> javac -classpath "c:/Program Files/Apache Tomcat
> 4.0/common/lib/servlet.jar;c:/Program Files/Apache Tomcat
> 4.0/common/lib/tools.jar" -d /"c:/Program Files/Apache Tomcat
> 4.0/webapps/cid/WEB-INF/classes/" -g -target 1.2 TestApp.java
>
> Compilation finished at Tue Oct 02 17:13:00
>
> But it doesn't look very nice (with the slash before the quote etc.), so my
> question is shouldn't the "Jde Compile Option Directory" be quoted by jdee
> instead? I solved that this way (see below) but maybe there is a better way?
>
> in jde-compile.el I changed
>
> (if (not (string= jde-compile-option-directory ""))
> (setq options
> (concat options
> " -d "
> (jde-normalize-path 'jde-compile-option-directory))))
>
> to
>
> (if (not (string= jde-compile-option-directory ""))
> (setq options
> (concat options
> " -d \""
> (jde-normalize-path 'jde-compile-option-directory) "\"")))
>
> I have only tested this in Windows but I can't see why it wouldn't work
> under unix/linux as well.
>
> /Olle
It would probably be preferable to toggle jde-quote-classpath variable in the
project file.
M-x customize-variable <return> jde-quote-classpath <return>
Mark