On Thu, 4 Oct 2001, Deacon Marcus wrote:

> Date: Thu, 4 Oct 2001 01:50:53 +0200
> From: Deacon Marcus <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: [half-off-topic] Java Compilers
>
> Hi,
> First, I'm sorry for being off-topic, but I have no idea where it would be
> on-topic, so I write it here. Besides, at least some of you will be
> interested.
> I'm starting another project - run-time compiled java, which I would like to
> develop into stable beta and then donate to ASF.
>
> There would be two classes, CompileUnit and CompileContext.
> First, you create a CompileContext, initialize it with working dir and
> classpath, then you create CompileUnit, initialize it with CompileContext
> and a .java file. Then, you can call .prepare() or .compile() to compile the
> file, and .newInstance() to create an instance or .getClass() to get Class.
> Or you could use Class.forName(), since in most cases CompileContext's
> classpath would be active classpath.
> I'm sure you see the similarity to .JSP now.
> While it may seem basic, having API for this wouldn't hurt.
> Possible scenario:
> Supponse, there's some kind of mail server with *extremely* complicated
> rule-set in form of 200kb+ xml. Why not take it, convert it into .java
> implementing some interface, convert it to java source with hundreds if not
> more ifs and cases, and load it as compiled code.
> What I need: since JDK 1.4b2, tools.jar just isn't what it used to be... so
> I need some kind of 100% java java compiler. And, I have no idea where to
> search for one. Of course, there's dozens, but it must be both stable and
> compatible with JDK 1.1 - 1.4.
>

A conversation on a semi-related topic is currently running on the
[EMAIL PROTECTED] list, about the potential contribution of the
"bcel" library to Jakarta.

It would be quite interesting if BCEL and/or your code could be used to
create the generated classes for JSP pages without going through a Java
compiler.

> Greetings, deacon Marcus
>
> p.s. Is it ok for me to use org.apache.jjc (or org.apache. whatever) before
> I officialy donate it, assuming I won't be distributing it before donating
> anyway?

It would *not* be wise to use org.apache under false pretenses.  Even
though you don't *intend* to distribute, it's difficult to move forward on
an idea like this without showing it to some people.

Also, there's no guarantee that Apache will accept it anyway -- especially
if there is not already a development community built up around it.

Craig

Reply via email to