Getting Started: Building and Running VMKit
This page gives you the shortest path to checking out vmkit and demos a few options. This should get you up and running with the minimum of muss and fuss. If you like what you see, please consider getting involved with the vmkit community.
A word of warning
While this work aims to provide a fully functional JVM and CLI runtime, it is still early work and is under heavy development.
Some of the more notable missing pieces in the CLI runtime are:
- Support for arithmetic overflow.
- Support for CLI object finalization semantics.
- Thread support.
Some of the common missing pieces in vmkit/llvm are:
- Hotspot-like virtual machine (e.g mixed interpretation/compilation).
Building vmkit / working with the code
If you would like to check out and build the project, the current scheme is (if you only want the JVM, you can skip the Pnet part. If you only want the CLI VM, you can skip the GNU Classpath part):
- Checkout and build LLVM from SVN head:
- svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
- cd llvm
- ./configure; make
- Download GNU Classpath 0.97.2:
- tar zxvf classpath-0.97.2.tar.gz
- cd classpath-0.97.2
- ./configure --disable-plugin --disable-examples --disable-Werror; make
- cd lib
- If you are running on Linux:
- ln -s ../native/jni/gtk-peer/.libs/libgtkpeer.so;
- ln -s ../native/jni/gconf-peer/.libs/libgconfpeer.so;
- ln -s ../native/jni/java-io/.libs/libjavaio.so;
- ln -s ../native/jni/java-lang/.libs/libjavalangreflect.so;
- ln -s ../native/jni/java-lang/.libs/libjavalang.so;
- ln -s ../native/jni/java-net/.libs/libjavanet.so;
- ln -s ../native/jni/java-nio/.libs/libjavanio.so;
- ln -s ../native/jni/java-util/.libs/libjavautil.so;
- If you are running on MacOS:
- ln -s ../native/jni/gtk-peer/.libs/libgtkpeer.dylib;
- ln -s ../native/jni/gconf-peer/.libs/libgconfpeer.dylib;
- ln -s ../native/jni/java-io/.libs/libjavaio.dylib;
- ln -s ../native/jni/java-lang/.libs/libjavalangreflect.dylib;
- ln -s ../native/jni/java-lang/.libs/libjavalang.dylib;
- ln -s ../native/jni/java-net/.libs/libjavanet.dylib;
- ln -s ../native/jni/java-nio/.libs/libjavanio.dylib;
- ln -s ../native/jni/java-util/.libs/libjavautil.dylib;
- Download PNet 0.8.0:
- tar zxvf pnet-0.8.0.tar.gz
- cd pnet-0.8.0
- ./configure; make
- Download PNetlib 0.8.0:
- tar zxvf pnetlib-0.8.0.tar.gz
- cd pnetlib-0.8.0
- ./configure; make
- Checkout vmkit:
- svn co http://llvm.org/svn/llvm-project/vmkit/trunk vmkit
- Configure vmkit:
- ./configure
- --with-llvmsrc=<directory>
- Tell vmkit where the LLVM source tree is located.
--with-llvmobj=<directory>- Tell vmkit where the LLVM object tree is located.
--with-gnu-classpath-glibj=<file or directory>- Tell vmkit where GNU Classpath glibj.zip is located.
--with-gnu-classpath-libs=<directory>- Tell vmkit where GNU Classpath libs are located.
--with-pnet-local-prefix=<directory>- Tell vmkit where PNet is located.
--with-pnetlib=<directory>- Tell vmkit where pnetlib's mscorlib.dll is located.
- Build vmkit:
- cd vmkit
- make (this will give you a debug build)
- Try it out: (assuming vmkit/Debug/bin is in your path)
- j3 --help
- j3 HelloWorld
- n3-pnetlib --help
- n3-pnetlib HelloWorld.exe