A java bytecode interpreter that was implemented by two students for the course on Abstract Machines at the TU Wien.
The name was inspired by cacao jvm.
Slides of our presentation: presentation.pdf
Working:
- Load class and jar files.
- All instructions except invokedynamic.
- Objects/arrays.
- Exceptions.
- Native method calls.
Partially:
- OpenJDK 11 Class Library (System.out.println works).
- Some functions are still missing to use libjvm with
java -XXaltjvm=
. - Primitive garbage collection.
Not implemented:
- Invokedynamic (String concatenation).
- Multi-threading / synchronized.
- Custom class loaders.
- Bytecode verification.
The repository contains run configurations for the CLion IDE.
Command line instructions:
mkdir build
cd build
cmake ..
make -j
ctest -j 12
Ctest uses the script compare.sh to compare SchokoVM to the system JDK.
-
Linux or macOS
-
OpenJDK 11:
If CMake finds the wrong version, you can set the JAVA_HOME environment variable.
-
libzip
,libdl
,libffi
You can optionally download the source code for OpenJDK 11 with this script:
cd jdk && ./download.sh
. This is not necessary to compile the project.
Some bullet points about the jvm specification can be found in JvmSpecNotes.md.