On Fri, 20 Jul 2001, Christopher Cain wrote:

> [snip]                             Are we talking a specialized wrapper
> targetting specifically the stuff required for JSP, or are we talking
> about a general all-purpose Java wrapper that we could possibly release
> as a separate tool?
> 

As an absolute minimum, Jasper doesn't need much -- just a way to invoke
the compiler in a multi-threaded server environment without multiple
instances clashing with each other.  Even external processes work, albeit
much more slowly than one would like.

I'm interested in accumulating a list of nicer features that we'd like to
see in a compiler API.  Here's some of my initial thoughts:

- Small, fast, lightweight, but generates good (optimized)
  bytecodes.  (Who says goals can't conflict with each other?  :-).

- Full support for all the features currently in, and about to be
  added to, the Java Language Specification (i.e. assertions and
  generics as soon as possible).

- Written in Java (and so embeddable in the Tomcat JVM) or accessible
  easily and reliably via JNI on lots of platforms.

- Published, stable, and supported invocation API.

- Packaged in such a way that multiple compiles can be initiated
  simultaneously (on different threads) with no conflicts.

- Accepts source input from configurable-per-class input stream,
  not just files.

- Writes the bytecodes of its output to a configurable-per-class
  output stream, not just files.

- Accepts its notion of a "class path" for looking up dependencies by
  handing it a class loader, instead of a CLASSPATH-type environment.

- Generates debugging information usable to map lines of Java code back
  to a non-Java language that the Java code was generated from (i.e.
  the outcome of JSR-045).

What did I miss?

Craig McClanahan


Reply via email to