Skip to main content

The Future of Java

There is no doubt that Java has held the title of the most popular programming language for many years ( credit stackify, codingdojo and vintaytime). Even if you agree with the various stats, we can easily come a consensus that Java is one of the top ten most widely used language in the enterprise world and most sought-after job skill for a software developer. I am not here to argue if Java really deserves its current spot but to predict (if I may), how it would evolve in coming years. Ever since Oracle took over the command and control of JDK development since 2009, there has been skepticism over the future of Java. Luckily we had several enhancements to Java in JDK 7 and 8, which restored the confidence we all have put in Java over many years. Java as a language had its flaws and drawbacks, which other languages (old and new) tried to fill in.

The real star was always JVM ( the runtime environment on which Java runs and makes it platform independent). Inventors of programming languages have started developing new languages, which runs on JVM but has better support for advanced programming concepts. Two of the most popular languages which run on JVM are Scala and Kotlin. Languages which were not originally on JVM started to create JVM compliant versions. Jython and JRuby are some of those. Such variants eventually lose their steam as the JVM version is not as fast and stable as the original one. Also, they have very few takers. Scala seemed to be taking over Java world by storm and there were many early adapters but the lack of skilled developers resulted in the risk of project continuity when scala experts leave the team. Scala is slowly gaining popularity in highly scalable and distributed enterprise system using Akka. Kotlin is now backed by Google as the official language in the Android platform. Even outside JVM platform, python has always remained the choice of programming language for students, academia, the scientific community, data analysis and even as a general purpose language. For financial technology, python and R are used widely as a prototype language.




Coming back to Java, a lot has changed recently. Oracle has started offloading many of the Java ecosystem components to open source community. J2ee has been transferred to Eclipse foundation as Jakarta EE. Java Fx and other java client libraries are also moving to OpenJDK. Eventually, Oracle is going to maintain and update minimal core Java platform features, which can give revenue support worth the effort which was put in the development. I am not saying that Java is going to sunset as there are frameworks like Spring, Grails and Play have been supporting Java for large application developments. Java itself has promising initiatives for future Java versions. In particular, I am excited about Project Amber, AOT (Ahead of Time) GaaL compiler, and Epsilon No-Op garbage collector, targeted for large JVM deployments. For native libraries and Projects like Netty, which are still dependent on C++ and JNI for a large part of their functionality, Project Panama is something to look out for. Var types were added in JDK 9 for local variables incorporating partial type inference. If you are still waiting for Val types for the magical immutability like Scala provides, then check out Project Valhalla.


Well, nothing is promised in terms of release dates for these new initiatives but since Java now has 6 months release schedule, it won't be too long when certain features from these projects will be added to next release candidate as and when they get ready. You can learn about new features added in Java 9 and 10 in my blog. Java has already become the first-class citizen in Docker environment and it is one of the most supported platforms for cloud deployments. Apache foundation has done an excellent job of creating so many Java APIs, used by Java developers everywhere. It's hard to find so much open source contributions in many other languages.


Click on image to view in full size


The moral of the story is that we should not rely on Java as the only language of developing enterprise applications. We should watch out for the industry trends and try out other JVM based languages, which makes the development team little happier. Even the most hardcore Java developer would be bored of working with Java every day (two decades in my case).Developers should be given the option to try out other viable options such as Python, R, Scala or Kotlin. Even Spring has now started to support Kotlin.

Epilogue: In this article, I have left out many languages such as Erlang, Lisp, Haskell, PL/SQL, and PHP. All of these languages would most likely be unaffected. The users of these languages are either passionate about them or usually these are the best choice for their specific need. When it comes to JavaScript and TypeScript, the battle is not for the best language but the best framework. That would be the topic for some other day.