jvm.go

A toy JVM written in Go

  • 所有者: zxh0/jvm.go
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

jvm.go

A JVM written in Go.
jvm.go Logo

Introduction

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.

My dev environment

  • Mac OS X 10.13.6
  • Java 1.8.0_201
  • Go 1.12

Build jvm.go

git clone https://github.com/zxh0/jvm.go.git
cd jvm.go
go build github.com/zxh0/jvm.go/cmd/java

Run jvm.go using your Java installation

Check your Java version and ensure JAVA_HOME env was set

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

Run jvm.go using Zulu

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

主要指标

概览
名称与所有者zxh0/jvm.go
主编程语言Go
编程语言Go (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2015-01-07 08:46:46
推送于2019-12-04 14:16:37
最后一次提交2019-12-04 22:16:28
发布数0
用户参与
星数3.6k
关注者数180
派生数469
提交数2.1k
已启用问题?
问题数26
打开的问题数12
拉请求数35
打开的拉请求数0
关闭的拉请求数5
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?