[antlr-interest] Dynamic Java compiler?

Jon Schewe jpschewe at mtu.net
Sun Apr 24 18:33:08 PDT 2005


On Sun, 2005-04-24 at 13:56 -0700, Terence Parr wrote:
> <antlr-interest at antlr.org>
> You can generate .class files with javac and then ask the classloader 
> to load them.  Or, use com.sun.compiler.* or whatever it is to do 
> inline.  See any servlet/jsp engine for the sample code I think.

Unfortunately that requires the source for all of the files to be on the
filesystem when the compiler runs.  This is possible in a JSP engine
because it's static, not dynamic code.  However this is not the case in
my application, as I'm generating the source on the fly as the
classloader requests the classes.


________________________________________________________________________
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