timwhitez starred jvm.go
2023-1-18 10:55:17 Author: github.com(查看原文) 阅读量:27 收藏

A JVM written in Go. jvm.go Logo

jvm.go is a toy JVM (which is far from complete) programmed in Go. The main purpose of this project is learning Go and the JVM. So the number one goal of the project is readability of code. The basic idea is to just implement the core JVM, and use rt.jar (from OpenJDK) as its class library. The garbage collector is implemented by directly using Go’s GC.

  • Mac OS X 10.13.6
  • Java 1.8.0_201
  • Go 1.12
git clone https://github.com/zxh0/jvm.go.git
cd jvm.go
go build github.com/zxh0/jvm.go/cmd/java

Check your Java version and ensure JAVA_HOME env was set

./java -XuseJavaHome -cp path/to/jars:path/to/classes HelloWorld

Download zulu jdk 8 (Zulu is a certified build of OpenJDK that is fully compliant with the Java SE standard.) and unzip it to somewhere, Copy jvm.go/java into unzipped folder

cd path/to/zulu8-macosx
cp path/to/jvm.go/java jvmgo
jvmgo -cp path/to/jars:path/to/classes HelloWorld

文章来源: https://github.com/zxh0/jvm.go
如有侵权请联系:admin#unsafe.sh