Bali is the name of an environment that consists of a programming language, compiler, and interpreter. The language is a subset of Java. The compiler is written in Java and generates an internal form that's interpreted by an interpreter also written in Java.
The environment has been developed specifically for compiling and running small programs on the fly. Small programs compile very quickly (a second or two) but run comparatively slowly (programs are interpreted, use a stack mechanism, and use Java's Reflection class to execute classes that are part of Java API).
The Bali compiler makes a single pass of the source (which may include any number of class definitions) and thus expects declarations and definitions to appear before usage. The compiler reports the first error detected. Similarly the interpreter catches any exception and reports it. Processing does not continue in either situation.
The following are not implemented in Bali:
Everything not mentioned above, which includes Java's API and any user-defined classes that have been compiled using a Java compiler and which exist in the classpath.
Tuesday, September 04, 2001