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:13:45 +0000
Valentin Tablan wrote: > That's interesting Lisa but it doesn't really solve my problem. What I > need is a means to compile a class starting from a String value containing > the source code rather than from a .java file. > > Valentin > > ----- Original Message ----- > From: "Lisa Retief" <lisa@xxxxxxxxxxxxxx> > To: "'Valentin Tablan'" <V.Tablan@xxxxxxxxxxxxxxx>; "'Advanced Java'" > <advanced-java@xxxxxxxxxxxxxxxx> > Sent: Friday, February 22, 2002 12:28 PM > Subject: RE: [Advanced-java] On the fly compile > > > Hi Valentin, > > > > You could write a CustomClassLoader which compiled the classes at runtime. > I > > have a PDF tutorial which describes how to do exactly this, and includes > > source code. It is 80K - let me know if you would like me to email this to > > you. > > > > Regards, Lisa > > > > -----Original Message----- > > From: advanced-java-admin@xxxxxxxxxxxxxxxxxxxxxx > > [mailto:advanced-java-admin@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Valentin > > Tablan > > Sent: 22 February 2002 13:21 > > To: Advanced Java > > Subject: [Advanced-java] On the fly compile > > > > > > Hello people, > > > > I use javaCC to parse my own mini-language which results in some bits of > > generated java code. > > Is there a way to compile that code without writing to the disk and > calling > > javac as an external process? > > I mean, starting from a String containing the source code can I get to a > > class that's known to the system without touching the disk either for the > > .java or the .class file? > > > > > > thanks, > > Valentin Tablan > > > > _______________________________________________ > > 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 > > > > > > _______________________________________________ > Advanced-java mailing list > Advanced-java@xxxxxxxxxxxxxxxxxxxxxx > http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java 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
- Follow-Ups:
- [Advanced-java] On the fly compile
- From: Valentin Tablan
- [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
- Prev by Date: [Advanced-java] On the fly compile
- Next by Date: [Advanced-java] On the fly compile
- Previous by thread: [Advanced-java] On the fly compile
- Next by thread: [Advanced-java] On the fly compile
- Index(es):