Markus Persson, known as Notch, chose Java for Minecraft primarily because he was already fluent in it and because the Java Virtual Machine (JVM) let the game run on Windows, Mac, and Linux without rewriting the code for each system. That combination of personal familiarity and cross-platform reach made Java the practical choice for a small, self-funded project that needed to reach as many players as possible.
The State of Java in the Late 2000s
When Minecraft development began in 2009, Java was one of the most widely used programming languages in the world. It had a mature ecosystem: a standard library, a huge collection of third-party libraries, and a large community of developers. The language had been designed in the mid-1990s with portability as a central goal, and by the late 2000s the JVM was available on virtually every desktop operating system. For an independent developer working alone, that meant a vast pool of documentation, forums, and ready-made code to draw from.
Java was also the language taught in many computer science programs and used in countless hobby projects. A developer like Persson, who had been programming since childhood and had worked on several small games and tools before Minecraft, would have encountered Java early and often. His previous projects, including the game Wurm Online (co-created with Rolf Jansson), were written in Java, so the choice was a continuation of his existing workflow rather than a new experiment.
Cross-Platform Reach Without Extra Work
The JVM abstracts away the underlying operating system. A Java program compiled to bytecode runs on any machine with a compatible JVM, which in practice meant Windows, Mac OS X, and Linux. For Minecraft, this was crucial: the game's early audience was spread across all three platforms, and a single codebase kept development and distribution simple. Persson did not have to maintain separate builds or learn platform-specific APIs. The same .jar file could be downloaded and run by anyone with Java installed.
This portability came with trade-offs. Java's graphics libraries (such as LWJGL, which Minecraft used for OpenGL access) still required some platform-specific native code, but the bulk of the game logic remained portable. The JVM also handled memory management automatically, freeing the developer from manual allocation and deallocation—a significant convenience for a solo programmer.
Performance and the JVM
Java has a reputation for being slower than languages like C or C++, largely because of its interpreted-then-compiled execution model and garbage collection. In Minecraft's early days, performance was indeed a concern: the game could be demanding on modest hardware, and the Java edition became known for needing a decent amount of RAM. However, the JVM's just-in-time (JIT) compiler improves performance over time, and for a block-based game with relatively simple geometry, Java was fast enough. Persson optimised where necessary, and the game's popularity grew despite any performance limitations.
It is worth noting that Minecraft was not the only game written in Java. Other titles, such as RuneScape and Wurm Online, demonstrated that Java could handle persistent online worlds. The language's networking libraries and threading model were adequate for the multiplayer features Minecraft would later add.
Why Not C++ or Another Language?
C++ was the dominant language for commercial game engines in 2009, offering direct hardware access and fine-grained control over memory. But C++ is more complex, with manual memory management, platform-specific compilers, and a steeper learning curve. For a solo developer aiming to prototype quickly and release on multiple platforms, Java's simplicity and portability outweighed the performance edge of C++. Other options, such as Python or C#, were either too slow for real-time 3D or less established for cross-platform desktop games at the time. Java struck a balance that suited Persson's skills and goals.
The Role of LWJGL and OpenGL
Minecraft's 3D graphics rely on OpenGL, accessed through the Lightweight Java Game Library (LWJGL). LWJGL provides Java bindings to OpenGL, OpenAL (for audio), and other native libraries, making it possible to write a 3D game in Java without writing C code. Persson used LWJGL from the start, and it became a core dependency of the game. This ecosystem of game-development libraries for Java was already mature enough to support a project like Minecraft, further reducing the friction of choosing Java.
Community, Modding, and Long-Term Consequences
Java's accessibility and the JVM's bytecode format made Minecraft relatively easy to decompile and modify. This inadvertently fostered a massive modding community. Tools like Minecraft Forge and Fabric emerged, allowing players to add content and change game behaviour. The Java edition became the primary platform for modding, and that ecosystem remains active today. The choice of Java thus had a lasting impact on how Minecraft evolved and how its community engaged with the game.
It also meant that running Minecraft required a Java installation, which became a common troubleshooting topic for players. Over time, Mojang bundled a Java runtime with the game launcher to simplify setup, but the underlying dependency remained.
What If Notch Had Chosen Differently?
It is impossible to know how history would have unfolded, but the choice of Java shaped Minecraft's development in concrete ways. A C++ version might have performed better on low-end hardware but would have been harder to port and mod. A web-based version (which later appeared as Minecraft Classic and the Bedrock edition's scripting) would have had different constraints. Java was not the only possible choice, but it was a coherent one given Persson's background and the technology of the time.
Frequently Asked Questions
Did Notch ever say why he chose Java?
Persson has mentioned in interviews and blog posts that he was comfortable with Java and that it allowed him to target multiple operating systems easily. He has not published a single definitive explanation, but his prior experience with Java and the language's cross-platform nature are the most commonly cited reasons.
Is Minecraft still written in Java?
The original Java Edition of Minecraft is still written in Java and remains the primary version for PC. Other editions, such as Bedrock (for consoles and mobile), are written in C++.
Was Java a common choice for indie games in 2009?
Java was used for some indie games, but C++ and other languages were more common for performance-intensive titles. However, Java's ease of use and portability made it a reasonable choice for small teams and solo developers.
Did Java limit Minecraft's performance?
Java introduced some overhead, particularly around memory management, and early versions of Minecraft could be demanding. However, the JVM's JIT compiler and ongoing optimisations allowed the game to run well on a wide range of hardware. Performance was adequate for the game's blocky, relatively simple graphics.
Why does Minecraft Java Edition require Java installed?
Because the game is compiled to Java bytecode, it needs a Java runtime environment to execute. The official launcher now includes a bundled runtime, but the dependency is fundamental to how the game runs.
Could Minecraft have been written in another language and been as successful?
Possibly, but the choice of Java enabled rapid cross-platform development and fostered a large modding community. Other languages might have offered better performance or different modding ecosystems, but Java's combination of familiarity, portability, and library support was well-suited to the project's needs.