Giter Club home page Giter Club logo

jvm.go's Introduction

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/jvmgo/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

jvm.go's People

Contributors

zxh0 avatar beyondblog avatar chenggiant avatar avelino avatar gxiaosong avatar haraldnordgren avatar ionicabizau avatar rednaxelafx avatar roryokane avatar stephlag avatar lonng avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.