jvm.go is a new JVM(which is far from complete) programmed in Go. The main purpose of this project is learning Go and JVM. So, the number one goal of the project is readability of code. The basic idea is just implement the core JVM, and use rt.jar(from OpenJDK) as its class libraries. GC is directly using Go's. For me, the hardest part is Thread and ClassLoader.
- Mac OS X 10.10.2
- Java 1.8.0_31
- Go 1.4
export GOPATH=path/to/jvm.go/
go install jvmgo
Create the following folder and file structure:
path/to/jvm.go/bin
├── jvmgo
└── jre/
└── lib/
├── rt.jar
├── currency.data
└── net.properties
cd path/to/jvm.go/bin
./jvmgo -cp path/to/jars:path/to/classes HelloWorld
/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/rt.jar