[antlr-interest] Dynamic Java compiler?

Terence Parr parrt at cs.usfca.edu
Sun Apr 24 13:56:17 PDT 2005


On Apr 23, 2005, at 6:51 PM, Jon Schewe wrote:

> You are misunderstanding.  javac does not use an instance of
> java.lang.ClassLoader (at least not that I've been able to find).  I'm
> generating classes inside a Java program that should then be executed
> inside the same JVM.

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.

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com



More information about the antlr-interest mailing list