Look in:

jde-compile-run-server

defmethod in jde-compile.el

There you will see that it runs the java compiler server in an inferior
beanshell.

(bsh-buffer-eval 
       (oref 'jde-bsh the-bsh)
       (concat
        (format
         "jde.util.CompileServer.compile(%s);"
         arg-array) 
        "\n")
       (oref this buffer))))

Thus the compiler is really invoked in jde.util.CompileServer.compile()
method.
It can be found in jde/java/src/jde/util/CompileServer.java. There you
will see:

    static {
        try {
            compiler = Class.forName("com.sun.tools.javac.Main");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

You will have to change the CompileServer.java to be able to invoke
eclipse compiler.

I wish this was configurable in JDEE.

HTH,
sandip

-----Original Message-----
From: Heinz-Dieter Conradi [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 17, 2003 2:59 AM
To: JDE Mailing List (E-Mail)
Subject: Re: integrating the eclipse compiler with jde


thanks all for the answers,

>  > i am a happy jde user. however, occasionally i like to work with 
> eclipse.  > this is not only due to the refactoring possibilities 
> offered by eclipse.  > another reason is the eclipse compiler, which 
> offers a lot of helpfull  > warning about e.g. meaningless assignments

> (ala x = x).  >  > the eclipse compiler can be used standalone:
>  >   java -classpath
$eclipse_home/plugins/org.eclipse.jdt.core_3.0.0/jdtcore.jar
>  >       org/eclipse/jdt/internal/compiler/batch/Main <options>
<files>
>  >
>  > i would really like to use it within the jde. if possible as
replacement
>  > for the javac server.
>  >
>  > is this possible? has anybody tried to do this?
>  >
>
> The JDEE's compile server runs javac in the beanshell (see 
> jde-compile.el). It could just as easily run the eclipse compiler or 
> any other compiler implemented in Java. All that is needed is to make 
> the compiler an option for the compile server, with the user able to 
> specify the jar file and main class for the compiler.
>

i hoped for that. my lisp skills are, unfortunately, more or less
non-existent. a quick look into jde-compile.el didn't reveal e.g. where
to set the main method. maybe i will have another look at the weekend.

furthermore, i suspect there is some additional work in order to make
emacs recognize the warning and errors.

another way has been mentioned:

> Check out jde-eclipse.el:

this requires a running eclipse and i was trying to do without it.
however, for the time beeing, it might worth considering.

heinz-dieter conradi

Reply via email to