jacobin
A more-than-minimal JVM written in Go.
Status
Intended feature set:
- Java 17 functionality, but...
- No JNI (Oracle intends to replace it; see JEP 389)
- No security manager (Oracle intends to remove it; see JEP 411)
- No JIT
- Somewhat less stringent bytecode verification
- Does not enforce Java 17's sealed classes
What we've done so far and what we need to do:
Command-line parsing
- Gets options from the three environment variables. Details here
- Parses the command line; identify JVM options and application options
- Responds to most options listed in the
java -help
output
To do:
- Handling JAR files
✏️ This is a primary focus of current coding work - Handling @files (which contain command-line options)
- Parsing complex classpaths
Class loading
- Correctly reads and parses basic classes
- Extracts bytecode and parameters needed for execution
To do:
- Handle more-complex classes
- Handle interfaces
- Handle arrays
- Handle inner classes
- Automate loading of core Java classes (Object, etc.)
Verification, Linking, Preparation, Initialization
- Performs format check of class file.
To do:
- Linking and verification
- Preparation
- Initialization
Execution
- Execution of bytecode
✏️ This is a primary focus of current coding work
To do:
- invokedynamic
- Calls to superclasses
- Annotated classes
- Arrays
Instrumentation
- Instruction-level tracing (use
-trace:inst
to enable this feature) - Extensive logging data (use
-verbose:finest
to enable. Caveat: this produces a lot of data)
To do:
- Emit instrumented data to a port, for reading/display by a separate program.
✏️ This is a primary focus of current coding work
Garbage Collection
GC is handled by the golang runtime, which has its own GC
Understanding the Code
A detailed roadmap to the code base can be found in the wiki.
Thanks
The project's home page carries a lengthy note at the bottom that expresses our thanks to vendors and programmers who have made the Jacobin project possible. They are many and we are deeply grateful to them.