What are some lightweight and customizable JVM options?

0
0
Asked By CuriousCoder92 On

I'm on the lookout for a lightweight and customizable JVM, ideally open-source, so I can dig into the code and modify it as needed. I'm trying to avoid the heavier production JVMs like Graal and HotSpot since their source is a bit too complex for my needs. Here are my criteria:

a) It should support at least Java 1.1.

b) I only need the JRE (just the 'java' executable, not the full JDK with 'javac' or other tools).

c) The JVM should not be written in Java; I'd prefer it to be in a compiled language like C, C++, Rust, or Go.

d) The source code should be easily modifiable.

I've checked out Jikes RVM (which requires a JVM to run) and Kaffee (which hasn't been maintained in over 14 years), but I'm hoping there are other options out there that fit my needs. Can anyone suggest any JVMs that might work?

4 Answers

Answered By JavaExplorer On

Another option could be this Rust implementation of the JVM: [rust-jvm](https://github.com/pirocks/rust-jvm). Besides that, if you're open to it, you can create a minimal JDK using J-link to keep only what you need. Check out the relevant docs [here](https://docs.oracle.com/en/java/javase/11/tools/jlink.html).

Answered By RustyBytes On

You might want to check out some JVMs written in Rust! One that looks promising is [rJVM](https://github.com/andreabergia/rjvm); it uses the real rt.jar from Java 7, so it should be decent. Also, there's [Jacobin](https://github.com/platypusguy/jacobin), which doesn't have JIT or JNI, but it's worth a look. It has a lot of Todos like adding support for inner classes, though.

Answered By NostalgicDev On

There’s also [Avian](https://github.com/ReadyTalk/avian), which is a discontinued project but was known for being lightweight. You might find it interesting!

Answered By GoDevGuru On

I found a Go-based JVM that's actively maintained, but it lacks some features. You can check it out here: [Jacobin](https://github.com/platypusguy/jacobin). It's not bad if you're okay with missing some advanced functionality.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.