Is there any specific reason why Java was the right choice for Minecraft?
closed as not constructive by Sean Middleditch, Maik Semder, MichaelHouse♦, Anko, John McDonald Jun 6 '13 at 14:46
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.
I saw a video from GDC where he said that he used Java because it's what he felt most productive in, at least at the time. It was only a passing comment though and note that this video is post-Minecraft, so his reasoning may not have been the same when he started Minecraft.
Source: This video from about 14:45 in answer to the question "What Tools or Technology Would You Recommend?"
A lot of people hate on Java, but honestly, modern Java is quite good. I mean, sure javac will never be as fast as a C/C++ compiler but if you take an in-depth look on how your Java code gets compiled into what eventually gets read by the JVM, you'll see why it's "slower."
Regardless, Java is a powerful and straight-forward language and I could speculate that he chose it both for the fact that he was comfortable with it and that he recognized that Java has platform-independence. That is, you can write your code (excluding native libraries you may be using) and compile it on that machine and it should be able to run on machines with different architecture, so long as they have the required JDK/JRE installed. And the way that Java handles networking-related tasks makes online(ish) games significantly easier to deal with. It also doesn't require you to explicitly handle all of your memory all of the time, something I find nice. Obviously, some people dislike that and, in all honesty, handling your memory 100% on your own is the "correct" way of doing it, but who does things the correct way these days? We have fast computers, let the garbage collector clean up our mess so we can focus on making fun games instead of the best way to handle dereferenced variables.
Here's some more thoughts, I like the second comment quoting John Carmack: https://stackoverflow.com/questions/1034458/why-arent-video-games-written-in-java
That is a question for the "What If Machine" from Futurama unless they officialy say it somewhere you can never tell. From what I would say it might have been chosen due to the fact that Java is cross platform and it is very easy to install it on Windows, Mac or Linux.
The second reason; the reason I would choose, is the fact that he must have had previous experience with Java. He said that he had worked for king.com. Here is the possible explenation. So from what I understand, he simply dislikes C++.
My name is Markus Persson, and I'm a programmer. You can call me "Notch". If you want to, you can email me at firstname.lastname@example.org. Be warned that my spam filter eats far too many real emails, though. What I Do
I currently run my own company called Mojang Specifications, where I'm currently developing a game called Minecraft.
I used to work for Jalbum as a programmer. Or developer. Or code guru. We got to pick our own titles. :D
> Before that, I worked for King.com as a game programmer for 4.5 years. I wrote games like Funny Farm, Luxor, and Carnival Shootout. I mostly did actionscript programming there, but also some java for the game verification code. Recently, I've done some work in C++. It's a powerful language and fun, but the retarded compilation system makes me cry a bit.
I was one of the founders of a unique mmorpg called Wurm Online. I'm no longer active there. I also make music under the name Markus Alexei. It's electronica, and releases are very far apart.