|
The J*va Interactive Environment
|
What is it? |
Way back in the early days of microcomputers (AppleII, TRS-80 Model I,
Commodore PET, etc.), there was very little distinction between the
command shell, the program editor, and the program interpreter.
These systems presented the user with a homogeneous environment based on
the BASIC programming language.
The J*va Interactive Environment (JIE) is an effort to create a similarly
homogeneous environment based on the Java(tm) programming language.
|
Why bother? |
A homogeneous environment, theoretically, is easier to learn and more
more efficient to use. JIE is intended to make the following activities
easier or faster:
- Prototyping
- Debugging
- Scripting
- Learning Java
Another major motivation for JIE is to eliminate the costs associated with
starting up and shutting down a Java VM. As new VM technology continues to
improve the performance of loaded code, the overhead of loading the code
becomes proportionately greater. Likewise, the operating system overhead of
starting up the VM itself.
If code (for example, "javac") can be loaded into the VM once, and then
reused again and again, it will speed up the development cycle significantly.
|
What does it do? |
JIE currently has a parser, an
interpreter, and a
shell (command line interface). The shell
reads a Java statement from the input stream, and hands it to the parser.
The parser parses the statement into an abstract syntax tree, and hands the
tree back to the shell. The shell then hands the AST to the interpreter,
which interprets the Java statement, and returns a result back to the shell.
Then the whole process repeats.
The shell supports local variables, so you can interact with Java objects
on the fly. For example, to create and display a Frame, you can type
the following in the shell:
java.awt.Frame f = new java.awtFrame("My Frame");
f.setSize(200, 200);
f.setVisible(true);
Where "f " is the local variable name for the Frame object.
You can then add a button:
java.awt.Button b = new java.awt.Button("My Button");
f.add(b,"Center");
f.validate();
Soon, JIE will support interpreted classes, that is, classes whose methods
are stored in Java syntax trees rather than Java bytecodes. This will be
combined with a syntax tree editor, which will allow programmers to edit
running code.
|
How does it work? |
The JIE interpreter makes extensive use of the Java reflection API to
dynamically manipulate Java objects. The parser is written using the
amazing, and highly-recommended antlr
language tool. The antlr meta-language allows you to intermingle Java code
in your grammar rules, which makes interactive parsing very easy.
|
Supported features |
The current version of JIE is 0.0. The current development plan for JIE is
as follows:
Version | Features |
---|
0.0 | Proof of concept, variables, expressions, compound statements,
flow control.
| 0.1 | Exceptions, "import" statements, more complete expression support.
| 0.2 | Method declarations, primitive types, complete expression support.
| 0.3 | Class declarations, complete flow control support.
| 0.4 | Syntax-tree editor proof of concept.
| 0.5 | Interpreted classes proof of concept.
| 0.6 | Useful editing functionality.
|
|
How do I get it? |
You can download the most current version of JIE
here. JIE is
distributed as a jar file. Download the jar file, extract the contents,
and follow the README file (if you aren't familiar with jar files, don't
worry; they are basically zip files, so zip tools work just as well).
The source code for JIE is available under the terms of the
Mozilla Public License, but you
have to request it by email.
|
Miscellaneous |
JIE does not rhyme with "pie". It is pronounced "jyieh". This is because
the "jyieh" sound in Chinese is romanized as "jie" in the pinyin romanization
scheme, and since the author lives in China, that's how he pronounces the
character string "jie".
The J*va Interactive Environment is spelled with an asterisk. According to the
Java
Trademark Guidelines: "Java and Java-based trademarks and service marks
('Java Trademarks') are Sun brands and should not be used by other companies
as brands for Java-related products or services. Accordingly, another company
involved in the provision of Java-related products or services should not
incorporate any Java Trademark into its own product or service names, its
company or trade name, or its own marks and logos, nor should it use any Java
Trademark in any other manner that may be understood to cause a likelihood of
confusion with Sun's Java brands."
Netrinsics does not want to cause any likelihood of confusion with Sun's
Java brands.
Java and all Java-based trademarks and logos are trademarks of Sun
Microsystems, Inc. in the United States and other countries.
|
[home] |
|
|