What are good open source versions of a Java virtual machine?

I am trying to write my own JVM. Can you point me to some existing open source implementations. Thanks.

+4
source share
6 answers

Hotspot (GPL, by Sun)

Harmony (Apache, also the basis for Android Dalvik VM)

Jamvm

CLDC - Connected Restricted Device Configuration (Sun Again) This is not open source, but source code is available.

+6
source

Check out Alternative Java Implementations or the Kaffe VM Link Page for which you will find the extract below (check the source site for links):

Kaffe based JVM

  • Latte

    Kaffe-based open source JVM.

  • JanosVM

    Utah's current job for multiprocessor JVMs.

  • KaffeOS

    KaffeOS is a Java virtual machine that allows you to execute multiple processes inside Kaffe. It separates the resource consumed by these processes, allows them to safely terminate, and provides a direct exchange between processes.

    Patrick Tullman says:

    (Kaffe Core Godmar Back team member Ph.D. thesis) The source is not but still, but I think it's just because Godmar decompresses after finishing his dissertation.

  • JESSICA Project

    The JESSICA project (Java Enabled Single-System-Image Computing Architecture) and the new JESSICA2 all projects are based on Kaffe to create a distributed JVM to run multi-threaded Java applications on PC clusters.

  • gilgul

    • Gilgul is a compatible extension of Java. * It presents a new look at the concept of object identity. * This allows you to replace dynamic objects by simultaneously redirecting the series as an atomic operation. * In this way, it provides facilities for the unforeseen evolution of software.
  • Alta p>

    The Alta Virtual Machine is a Java-compatible virtual machine designed to provide an embedded service process for Java applications. Caffa based viola.

  • Guaraná

    Guarana is a reflective architecture that seeks simplicity, flexibility, security, and meta-level code reuse. He uses Kaffe as his base. Guaraná is available for download under the GPL.

  • Kangaroo

    kangaroo is a J2ME / CLDC virtual machine.

Free JVM Software

  • Red Hat Sourceware Project for Java (gcj).

    Red Hat (who bought Cygnus) is developing a complete free software development toolkit for the Java language. gcj is part of the egcs project and provide both a Java interface and a set of runtime libraries for EGCS. Also includes a gij translator.

  • jRate

    An extension of the GNU GCJ front-end compiler and runtime system which adds support for most of the functions required by the real-time specification for Java (RTSJ).

  • ORP (Open Runtime Platform)

    From Intel.

  • Jikes Research Virtual Machine (RVM)

    Self-service free virtual machine (written in Java!)

  • Jc

    A virtual machine written in Java that converts Java bytecode to C before running. (from project Caffe graduates Archie Cobbs)

  • Japhar

    Japhar is the Java Hungry Programmers virtual machine. It was built from without consulting Sun sources. Japhar is LGPLed and available for download.

  • ElectricalFire

    ElectricFire is an open source project that came from a canceled commercial project at Netscape and is now sponsored by Netscape under Mozilla.

    ElectricFire is a Java virtual machine that uses JIT (Just In Time) compilation methods to speed up Java code execution. ElectricalFire was designed from the very beginning to generate high-performance machine code and be portable to many processor architectures.

  • Waba

    A small JVM is designed for portable devices.

    In addition, Wabasoft and SuperWaba.

  • Joeq virtual machine

  • Kissme virtual machine

  • Sablevm

  • Wonka

    Java Clean Room Virtual Machine (tm), originally developed by ACUNIA telematics experts. It is extremely portable and self-contained and may not necessarily be used with its real-time artist (OSwald (tm)) to provide a complete solution for embedded devices.

    In addition, WonkaVM's chief architect, Chris Gray, finances the company to provide embedded Java solutions called Mi | k | a (TM).

  • Jamvm

  • Jupiter

  • IKVM

    Java Virtual Machine for .Net !.

  • Java pathfinder

    A run-time checker / verifier of runtime from NASA, which is actually a state mapping, backtracking JVM, which is a model that is written and runs on top of Java! He can (with Kaffe Project Alumni Peter Melitz)

  • Aegis VM

    Aegis VM Projects - This is an ongoing effort to develop a lightweight, secure virtual machine for executing Java bytecode. A VM designed to be an extension for applications or devices that dynamically load and execute untrusted extensions.

  • JAOS (Java on Active Object System)

    Java virtual machine for AOS system and case study in compatibility between Oberon and Java languages.

  • CACAO

    Java research virtual machine developed at the University of Vienna Technology and released under the GPL. VM uses a compilation-based approach, which means no translator is available. An optimizing JIT compiler is available for a number of architectures.

  • Ovm Project

    An open source framework for creating system programming language programming time. Ovm is a DARPA-funded collaborative effort by Purdue University, SUNY Oswego, University of Maryland and DLTech. Electric Current Accent for Ovm - Create a Java VM compatible with the Real-Time Specification for Java.

  • Mysaifu jvm

    Java VM running Windows Mobile 2003 for Pocket PC (Pocket PC 2003) licensed under GPLv2 (GNU Public License Version 2).

  • Dynamicjava

    Java source interpreter written in Java.

  • Ghost car

    For palm.

  • Jnode

    The LGPL JVM and operating system written in Java, with a JIT-like native code compiler and byte-code translator. No C code - just Java and assembly!

  • Jx-os

    The GPL'd system architecture consists of a set of Java execution components on the JX core, which is responsible for system initialization, CPU context switching, and low-level domain management. Java code - this is organized into domain-uploaded, validated and translated into native code.

  • Jamiga

    A GPL'd JVM for Amiga.

  • Kabavma system

    A small Java Runtime designed for small hardware devices. See Japanese web pages for details.

  • Nanovm

    A small Java virtual machine for the Atmel AVR ATmega8 CPU, a member of the AVR CPU family used, for example. at DLR Asuro.

  • Hormones (wiki)

    Apache Foundation's efforts to create a new cleanroom J2SE-compatible environment, and Geir Magnusson, Jr. Wrote an offer and this wiki page for details.

Sun JDK Ports

  • Sun Microsystems - java.sun.com

    First of all, where is Java. They also have a list of official ports.

  • Java for FreeBSD

    This is an unsupported version of the Sun Java Development Kit ported to FreeBSD. It is tested for any problems that may exist. It is not known that there are currently significant errors, but there is no guarantee of usability.

  • Blackdown JDK for Linux

    Blackdown JDK is the Sun Java Developer Toolkit for Linux port.

Both lists have not been updated, and initiatives such as OpenJDK or Apache Harmony are missing.

However, I don't know what you mean by “good open source implementations”. Good does not mean the same thing to everyone and may depend on the context. Kaffe is an excellent choice as the basis for training and / or research in the field of virtual machines. IBM Jikes has a very fast compiler, OpenJDK may be very mature, but it may not be the best choice for educational purposes, etc. These are all good implementations, but I don’t know which one is “better” for you. In fact, I will let you decide.

+10
source

I don't think openjdk sources are a good starting point for learning how to write a virtual machine. This is too big and too platform specific. There are alternatives around:

  • They say Parrot VM supports Java Bytecode . Parrot VM is already registered based.
  • Projekt shark (as part of openjdk it project zero) is a portable OpenJDK plug-in without assembler sources. As far as I know, it uses LLVM. At http://gbenson.net/ there is information on how to debug it.
  • The LLVM project has an incomplete JAVA interface.
  • Sun is rewriting the JVM in JAVA. It is called Maxine, and it is considered for research. See http://wikis.sun.com/display/MaxineVM/Home for details.

There is a good Wikipedia entry on alternative JVM implementations. Some of them are already mentioned here, some are not.

+3
source

Here are two toy JVMs:

+2
source

Definitely use the sources provided by rq, but if you intend to write a JVM, consider using registry-based registrations . As described in the document, register-based machines are flying, but should be faster. And since there does not seem to be any case-based JVM-based implementations, this would be an added benefit to writing from scratch.

0
source

If you like something more exotic and higher-level, IKVM is an open source JVM built on the mono /.NET CLR.

0
source

All Articles