[antlr-interest] Dynamic Java compiler?

Jon Schewe jpschewe at mtu.net
Thu Apr 21 05:16:52 PDT 2005


I have to believe that someone on this list has seen such a thing or
even written it.  I'm looking for a Java compiler that has the following
features:
      * Is written in pure Java
      * Uses a ClassLoader to find other classes to compile (so I can
        generate the source on the fly)

I'd also like it to handle Java 1.5 syntax, but this isn't a
requirement.

I've looked at DynamicJava and it doesn't handle circular class
references.

JavaAssist is close, but it can't be given a whole source file to just
compile, only method bodies.

Groovy works pretty nicely, but doesn't handle the final keyword or
interfaces.

BCEL is just too low level.  If someone took the Java 1.5 antlr grammar
and then used BCEL in teh actions, that would probably work.


________________________________________________________________________
Jon Schewe | http://mtu.net/~jpschewe
GPG signature at http://mtu.net/~jpschewe/gpg.sig.html
For I am convinced that neither death nor life, neither angels 
nor demons, neither the present nor the future, nor any 
powers, neither height nor depth, nor anything else in all 
creation, will be able to separate us from the love of God that 
is in Christ Jesus our Lord. - Romans 8:38-39





More information about the antlr-interest mailing list