The Only Way Is Java.9 million agree.

Reports of Java’s death greatly exaggerated – and here’s why

Chris Mayer

ZeroTurnaround Java engineer Arnel Pällo sparks emotive debate regarding the state of Java

It’s an old, old fabrication – Java is on its last legs. At death’s door if you will. Some have even harshly dubbed it the ‘COBOL of the 21st century’. If we’re honest, the Java bashing has become rather wearisome so it was great to see a riposte from Arnel Pällo at ZeroTurnaround reassuring us that Java was not dead but in fact, very much alive.

Java is not dead…in fact, it’s got more than enough energy to kick your app in the butt. Too often, critics focus on niche issues and make unfair comparisons to other technologies or languages that do not have the same level of widespread use, applicability or history as Java. It’s like comparing a car to a carpet.

For all the qualms with Java and the JVM, the fact remains: Java has become the people’s choice with over 9 million Java developers worldwide according to Oracle statistics. Arnel makes a pretty strong case for why this might be: ’consider the widespread applicability and excellent engineering behind the JVM platform, the clarity of syntax, the rich ecosystem of tools and libraries’.

Arnel goes convincingly through Java’s best attributes, point by point. But here’s a synopsis of why Java isn’t on its deathbed just yet.

  • The Java platform is an engineer’s dream

The HotSpot JVM is a marvellous piece of engineering. It does stuff the CLR can only dream of and is so heavily optimised that often Java apps can even match the performance of C programs. Also, there is quite a selection of other virtual machines available (such as JRockit, Zing), should your environment have some specialized requirements.

Secondly there’s a multitude of JVM-based languages, which makes the platform even more amazing. It goes way beyond the famous ones like Groovy, Jython, JavaFX and Scala. Java now includes such treats like invokedynamic opcode and the java.lang.invoke package, making it easier to build dynamic languages for the JVM

  • Java is verbose? Of course it is!

People say Java is so verbose, and it slows them down. Critics often refer to the strong static typing and lack of bleeding-edge features in the language. However, I believe this is actually deliberate and a good feature of Java.

Dynamic languages are popular when starting a new small project, but consider this – with the help of modern frameworks and proper tools (i.e. consider using an IDE instead of Notepad), creating a “Hello Guestbook” type of application in Java is a simple, 10-minute affair.

  • Java is verbose but with that comes strength

Writing Java code is fast when using a modern IDE (Eclipse, Netbeans, IntelliJ). All of them have code completion and shortcuts that take much verbosity-related angst out of your day. Using relatively modern (i.e. less than 3 years old), versions of Spring and Hibernate, you don’t need to write five miles of xml to have red buttons with rounded corners (it has never been that bad but people love exaggerating). You can use annotations most of the time. Even when you need applicationContext.xml, using a Spring IDE plugin makes that a breeze. With JEE 6, you don’t even need a web.xml. Even if you have to use an older servlet spec, IDE will generate web.xml for you. It can generate a project layout and add servlets just like Grails’s command line console, but better.

That’s just taking parts of Arnel’s look Java’s plus points – reading the whole article certainly brings a cogent argument to the fray in support of the language. The thematic comments nearly all bring worthwhile points to the debate too, so it’s worth your while getting involved. 

Through the combination of all these things, Java has becoming a flourishing hub for creativity, always trying to better itself for the greater good of those within the ecosystem. Any naysayer is spouting pure fallacy, or at the very least basing their judgement on subjectivity, after a bad experience with Java. An often-cited flaw with Java is its speed, but how empirical is that complaint? People said it in 1997 and Java is still here – shapeshifting over the years to meet the demand of those using it. With Java 8 on the way next year, bringing with it a raft of further enhancements, Java isn’t dead – in fact it’s been given new blood.

Do you believe Java has had its day in the sun? Is it dying or in better health than ever? Tell us your thoughts below.


Leave a Reply

Your email address will not be published.