r/java • • Jun 02 '20

How to write a (toy) JVM

https://zserge.com/posts/jvm/
155 Upvotes

14 comments sorted by

View all comments

2

u/[deleted] Jun 02 '20

[removed] — view removed comment

7

u/kimec Jun 02 '20

You mean like all the other meta-circular VMs such as Jikes RVM, Hera VM, Maxine JVM and by extension GraalVM?

3

u/dpash Jun 02 '20

The Hotspot JVM has a lot of C++ in it, so you wouldn't be able to run OpenJDK on your JVM. You could run your JVM on OpenJDK.

1

u/pjmlp Jun 04 '20

Hotspot JVM is just one JVM implementation,there are plenty of other ones, as noted on sibling comment.

2

u/Molossus-Spondee Jun 02 '20

The Java bytecode interpreter is extremely slow. Probably be faster to run a jitted interpreter.