To promote the Java language and platform, Sun published JVM specifications early on. This document was meant for developers who wanted to write a JVM implementation themselves, perhaps for platforms that did not have an official JVM implementation available yet. It described which low-level commands JVM can execute, the required data structures, rules on accessing memory, the Java bytecode's .class file format, and much more.
While not originally a goal of the designers, the release of the specifications also made it possible for other language writers to experiment with the Java bytecode, and it didn't take long before other languages could compile to that format. Sun, and later Oracle, liked this development a lot. They liked it so much that Oracle even added new features to JVM, solely to make it easier to support dynamic languages on JVM.
In this chapter, we will cover the following topics related to alternative JVM languages:
- Understanding why should we choose a language other than Java for JVM development
- Discussing the possibility of mixing languages in a single project and the issues that would be expected
- Writing unit tests in a different language than the one used in the main project