C++ is really terrible for cross-platform development. The core language is 90% full cross platform, but the instant you add networking or GUI or 3D or an installer or multi-threading, you generally use extremely platform dependent libraries. On top of this, the C++ dev environment on Linux is exceptionally tricky and difficult to work with.
Java seems to have a real opportunity here:
- it has excellent runtime support on Windows/Mac/Linux
- you can easily bundle a JRE so that you don’t expect your users to understand and maintain that themselves.
- Runtime performance is excellent. It’s generally only ~20% slower than C++. I know performance is extremely complicated and not so easily summarized, but that is a reasonable high level approximation.
- The dev tools and experience is dramatically better in almost every way. The language is much nicer, it is more complete (stuff like networking and threading is built-in), IDEs are nicer, build tools are nicer (Gradle + SBT are far better than makefiles), debuggers and profilers are better. Debugging memory leaks, and array out of bound writes is orders of magnitudes better.
- Scala. Scala is dramatically more elegant than the Java/C# breed of languages. This has practical benefits in terms of maintenance and higher level reasoning as well. Many more builder type programmers don’t appreciate this type of high level stuff, but some do, and I suspect this will grow.
The negatives are:
- Java has a bad image. People don’t like it for only semi-valid reasons. For example, people had some bad experience with the Java web plugin, which is valid, but are soured off on the whole Java ecosystem which really isn’t valid. People also have bad experiences with “enterprise” Java or JavaEE or JPA or Spring or Struts, which I think is valid, but is turned off of everything else, which isn’t valid.
- There is no momentum behind Java. 95% of the game programming community is primarily C++ or JavaScript or Objective-C. Java is off the radar. People don’t understand it and aren’t excited about it and don’t even learn it.
- No game programming infrastructure for Java.
- Java doesn’t have a good route to iOS or consoles. Even C++ is better for these.
Anyway, I fell like the Java community should seize the opportunity while it is here.