[antlr-interest] Dynamic Java compiler?

Terence Parr parrt at cs.usfca.edu
Mon Apr 25 11:46:17 PDT 2005


On Apr 25, 2005, at 11:37 AM, Jon Schewe wrote:
>> Can you write to a file?  JSPs change on the fly so they must be
>> reloaded throwing out the old .class file.  :)
>>
> Sure, but I don't know all of the dependencies ahead of time, so the
> compile will fail and I'll have to parse the error messages to figure
> out which class, then generate that and continue.  If the compiler used
> a ClassLoader, like DynamicJava or Groovy do, then instead of looking
> for the source on the filesystem the compiler would just ask the
> ClassLoader for the Class and I can then generate the source and push 
> it
> back through the dynamic compiler.

Ooooh!  I get it.  You have absolutely no idea what imports are 
required, eh?  Well, I'll bet you could look at the source for the 
javac compiler and then see whether it's possible to use your 
classloader.

Ter

--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1052 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20050425/be929c15/attachment.bin


More information about the antlr-interest mailing list