Yes, Java Has Flaws. But...
Yes, Java Has Flaws. But...
Is Java the new Cobol? Probably, but Cobol is still running. Java will be in enterprises for at least 20 more years.
Join the DZone community and get the full member experience.Join For Free
I have been coding in Java since early Java 1.0 when I was at E&Y in the mid-1990s. HotJava was the only book out, and there was only the language spec to read. It was the underground hot language. Really edgy, pushing what you could do with a C syntax, and more safety than C++. The fact you could run it in UNIX, Windows, Linux, Mac, or set-top was amazing. It was powerful enough that many companies wrote browsers, servers, engines, rules engines, libraries, frameworks in Java. It exploded. The explosion is now a trickle, but the number of editors (Eclipse), servers (Hadoop ecosystem), Big Data (half of Flink), and libraries are astounding.
Java is still used in Android (it may be replaced by Swift, but not this day).
The JVM is a beast, running all kinds of near-real-time/Big Data and huge websites. Tons of companies are still using it in enterprise and in the web. AOL has put out a really sweet Java 8 library. Spring Boot is an awesome library for rapid Java development.
Even though I am doing all my Spark coding in Scala, I still need Java Maven repos. The tens of thousands of libraries for Java are astounding. They work for Scala and the other languages on the JVM. There are a ton of awesome thin, 12-factor-enabled, microservices, lightweight libraries from Lightbend and Pivotal, amongst others.
There is support from all the enterprise players: Oracle, IBM, HPE, EMC, VMWare, Hortonworks, and Cloudera. New libraries and amazing tools are being written daily. If you search GitHub for new Java libraries and projects, you will find some awesome ones. From SOAP to Nuts.
If you want to do IoT, well Java is everywhere at that layer.
There are hundreds of thousands of developers, hundreds of consulting companies and most of the Global 2000 are all doing Java development and have a ton of Java assets and developers.
Is it the newest language with the coolest new features? No, but every Java release co-opts the best of what's out there. I like Scala, Go, and Node.JS. But when I want something that everyone can read and can run on every platform—and the ubiquitous Tomcat—I write it in Java. Every cloud and PaaS from AWS to Google to CloudFoundry to Heroku, all support Java. Installing and running a Java server in a VM, a server, a laptop, or a Docker or Rocket container is dead simple. With frameworks like Spring Boot, SparkJava, DropWizard, Ninja, Play and others, you have a choice for writing concise microservices and good code.
Java is verbose, but that makes it very easy to read. And maintenance is the most important thing when writing code, even if you are writing it to be replaced. Running code with tests makes for great documentation for the next iteration or application.
Is Java the new Cobol? Probably, but Cobol is still running. Java will be in enterprises for at least 20 more years. Will I be writing in Scala and Go and some other language as well? Certainly. Will Java go away or stop being relevant? Not anytime soon. Java was dead and then there was Android, Hadoop, IoT.... Every time you need a language that just works and you can find people to code in, there you go. Maybe Node.JS is better for front-end and Go for network servers and Scala for Spark. But for enterprise applications, it's hard to go wrong with Java. There's a lot of bad coders out there and lots of messy code, and you could blame Java for not forcing people to write better code (Scala is better at that). But Java is freedom. The freedom to run anywhere, do anything, write any program with every kind of library you want. It's still a major language at universities and in tons of cool libraries like Stanford NLP.
I encourage a healthy debate.
Java has flaws, but not enough flaws that it doesn't do the job in most major companies and systems in the world, 24/7.
Opinions expressed by DZone contributors are their own.