Run on a virtual machine
The compiler emits portable bytecode for a runtime such as the JVM, .NET or BEAM, which loads it, compiles the busy parts to machine code and manages memory and threads.
How they work
Java, Scala and Clojure compile to JVM class files; C# and F# to Common Intermediate Language for .NET; Erlang and Elixir to .beam files for BEAM. One build runs on every platform the runtime supports, and the runtime supplies the garbage collector, threads or processes, and the standard library. Languages on the same runtime share libraries: Scala imports Java classes directly, and a class written in one .NET language can be subclassed in another.
The cost is the runtime itself: it has to be installed or bundled, it takes time to start, and code runs slower until the JIT has compiled the hot paths. Ahead-of-time options such as GraalVM Native Image and .NET Native AOT trade some dynamic features for a single native executable. See Runtime virtual machines for how the JVM, CLR and BEAM differ.
Technologies
What all programming languages have in common →| Open source | Microsoft / .NET Foundation | MIT (Roslyn compiler) | 2026-10-08 | |
| Open source | Rich Hickey / Clojure core team | Eclipse Public License 1.0 | 2026-10-08 | |
| Open source | The Elixir Team | Apache 2.0 | 2026-10-08 | |
| Open source | Ericsson (Erlang/OTP team) | Apache 2.0 | 2026-10-08 | |
| Open source | Microsoft and the F# Software Foundation | MIT | 2026-10-08 | |
| Open source | Oracle / OpenJDK | GPL 2.0 with the Classpath Exception (OpenJDK) | 2026-10-08 | |
| Open source | EPFL and Scala Center | Apache 2.0 | 2026-10-08 |
Sources
- The Java Virtual Machine Specification, Java SE 21: Chapter 1 (class files; any language can be hosted)
- Scala docs: Scala for Java Programmers (standard Java class files; using Java classes)
- Clojure: Hosted on the JVM
- Microsoft Learn: Managed execution process (CIL, JIT)
- Microsoft Learn: Common Language Runtime overview (cross-language integration)
- Erlang/OTP docs: Compilation and Code Loading (BEAM and .beam files)
- Elixir docs: Code (modules compiled to bytecode in .beam files)
- OpenJDK: JEP 483, Ahead-of-Time Class Loading & Linking (start-up cost of loading and linking classes)
- GraalVM docs: Native Image
- Microsoft Learn: Native AOT deployment