Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Advanced-java] On the fly compile
- From: terry.williams@xxxxxxxxxxxxx (Terry Williams)
- Subject: [Advanced-java] On the fly compile
- Date: Fri, 22 Feb 2002 13:47:20 +0000
Valentin Tablan wrote: > I'm sorry if I'm missing something but I believe that the > CompilingClassLoader makes an external call to javac in order to compile the > .java source and then reads the resulting .class file from the disk creating > a Class object out of its bytes. How exactly would you change this to use > streams/readers? > > What I need is a 100% java way to access javac(or any other java compiler), > send it the source as a String/stream and get back the bytes for the > compiled class without touching the disk at any time. > > thanks, > Valentin > > > Having just read through that document, if you take a look at the source > at the > > end of the document it is reasonably easy to modify it to operate using an > > InputStream & and an OutputStream (if necessary). > > > > Terry > > > > _______________________________________________ > > Advanced-java mailing list > > Advanced-java@xxxxxxxxxxxxxxxxxxxxxx > > http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java > > > > > > _______________________________________________ > Advanced-java mailing list > Advanced-java@xxxxxxxxxxxxxxxxxxxxxx > http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java Well, now that sun has said it's okay to ship more than the runtime system it's probably okay to use the com.sun.tools.javac.v8 which supply all the required functionality needed to compile in memory. You can find the classes in the tools.jar - along with the decompiler & jar. Enjoy Terry
- Follow-Ups:
- [Advanced-java] On the fly compile
- From: Greg Munt
- [Advanced-java] On the fly compile
- From: Vladimir G Ivanovic
- [Advanced-java] On the fly compile
- References:
- [Advanced-java] On the fly compile
- From: Lisa Retief
- [Advanced-java] On the fly compile
- From: Valentin Tablan
- [Advanced-java] On the fly compile
- From: Terry Williams
- [Advanced-java] On the fly compile
- From: Valentin Tablan
- [Advanced-java] On the fly compile
- Prev by Date: [Advanced-java] On the fly compile
- Next by Date: [Advanced-java] Generating a html ImageMap from JTabbedPane
- Previous by thread: [Advanced-java] On the fly compile
- Next by thread: [Advanced-java] On the fly compile
- Index(es):