Why Java has been “dying” for 25 years but is still here

Why Java has been “dying” for 25 years but is still here
Why Java has been “dying” for 25 years but is still here

The talks of the death of Java started at the moment of its conception. 25 years later, is it time to stop arguing? Of course not! Let us share our opinion so you can destroy us in the comments, and together we’ll find out if Java is still alive and kicking!

The instantaneous death of Java™ was predicted as soon as it was born. And yet, 25 years later, it seems to be feeling exceptionally well on top of the TIOBE index of the most popular programming languages. Of course, the more developers use a specific language, the more favorable and critical opinions circulate behind the scenes. But still, aren’t you curious to know why everybody is talking about Java’s swan song, but nobody has heard it yet? Let’s find out!

Here’s a list of all accusations usually brought against Java and corresponding counterstrikes.

First Java versions were awfully slow. To make Java’s fundamental WORA (write once, run anywhere) principle a reality, it had to run on JVM, which added an extra software layer. As a result, waiting for your app to start up was like waiting for the Second Coming.

👍 Much water has flowed under the bridge since then. Thanks to the introduction of the JIT-compiler, HotSpot, and other improvements, Java is considered one of the fastest languages. In addition, there are special tools (such as Liberica Native Image Kit) that enable the developers to reduce the startup of their applications to 1/10 of a second! Not bad for a dying language, huh?

At the beginning, Java developed at a far too moderate pace. Eleven years passed between Java 6 and 9! As a result, bug fixes, new features, and improvements couldn’t keep up with general technological progress and increasing demands.

👍 Oracle took note of this shortcoming and flipped the situation around by introducing a new release schedule. LTS releases now come out every two years, plus feature releases every six months. In addition, major contributors to OpenJDK constantly hunt down and fix bugs and integrate security patches upstream. Modern Java is like a train that took off agonizingly slowly but accelerated and now rushes forward at 500 km/h.

In the cloud era, any language that doesn’t satisfy the needs for cloud development and production is as good as dead. JVM devours tons of memory resources, which means that Java is unsuitable for the cloud where every Mb is precious.

👍 And again, it might have been true several years ago, but now Java is armed to the teeth. Applications based on newer JDK versions take up significantly less space. In addition, native image technology helps to minimize resource consumption even more. Try building apps with Spring Native or containers with Liberica Native Image Kit, and you will see how minuscule they are.

Java is verbose: engineers have to write miles of code with constant repetitions, type statements, and explicit initialization. In addition, the consequence of backward compatibility is that the standard API contains lots of inconvenient things used 20 years ago.

👍 Both of these accusations have one powerful counterargument. Java is primarily the language for enterprise use. Its so-called verbosity makes the code easy to read and understand. It would be a nightmare to try and figure out the code on C left by a previous developer. In addition, backward compatibility enables a more manageable process of upgrading to a newer Java version.

Companies are stuck with Java and high expenses. Although Sun turned Java into open source software to eliminate vendor lock-in, commercial support provided by Oracle costs a lot of money.

👍 Let us remind you that Oracle Java is not the only choice, and there are several other high-quality JDK distributions on the market. The migration to some of them is super easy: change a couple of lines of code and enjoy all the benefits of modern Java. You will be able to reduce your TCO by 50% min. and receive longer support for older JDK versions.

Upgrading to a newer LTS version every two years is costly in all aspects: it demands time, effort, and money. But it’s impossible to avoid upgrading altogether as Oracle is ending support of older versions.

👍 If you strive towards enhanced security and performance of your JDK, upgrading is necessary, and a shorter release cadence means more rapid integration of significant improvements and security patches. However, you don’t have to follow the 2-year schedule. Choose a suitable OpenJDK distribution and stay on older LTS versions receiving all necessary bug fixes and off-cycle emergency patches.

The Java community has been divided since the establishment of OpenJDK, so now it is just a bunch of companies who try to build open source Java under Oracle’s regime.

👍 On the contrary, the community is Java’s strong suit. All OpenJDK distributors and other stakeholders work closely together on improving Java. In addition, OpenJDK Vulnerability Group and Java Community Process Executive Committee are two mechanisms that help hunt down and eliminate issues and vulnerability quickly. So Java is getting faster, stronger, and better day by day through joint effort and cooperation.

Java is not recommended as the first language taught (according to the article published by the United States Department of Defense’s Center Software Technology Support in the Journal of Defense Software Engineering in 2008). Students have no feeling for the relationship between the source program and what the hardware would do.

👍 It is quite the opposite, and Java can be considered the best language to start with. Why? Java is statically typed and demands explicitly, so beginners know what they do and make better design choices. For example, private variables in Java are a must, whereas they are only conventions in Python. You write String name = “John” in Java, but Python is satisfied with the simple name = “John.” So in Python, newcomers will unconsciously heap up tons of mistakes, which leads to poor design. Java makes students disciplined and conscious about their decisions.

Speaking of Python. According to the TIOBE Index as of October 2020, Python became the most popular programming language. A temporary upsurge, let us assure you. Java will get the upper hand again, and here’s why:

  1. Java’s performance is higher than that of Python, thanks to JIT and concurrency support. Compilation in Java doesn’t require additional time and memory. Applications written on Python are slower at startup due to the necessity of interpretation. Variable types are determined during runtime, increasing the interpreter’s load, and remembering object types requires additional memory usage.
  2. Java, as opposed to Python, doesn’t permit object mutation, which increases development safety. In Python apps, bugs are detected only when the line of code with this bug is used. It leads to the disruption of the app’s work and extended time of bug search.
  3. Java stability is higher. In Python, the syntactic check is performed during runtime, in Java — ahead-of-time, so code must already be well-written, or the application won’t compile.
  4. Java has a broader sphere of application. It is used in enterprise, embedded technology, web applications, whereas Python is best suitable for machine learning and scientific research.

Java is not fitted for clear and concise coding. It is the language for companies with the monolithic monstrosity of an app and a large team of mediocre programmers maintaining it.

👍 Today, a programmer who works alone on a project is a rare bird. There’s always a team managing an app, and Java fosters well-cooperated work (static typic, verbosity, checked exceptions) and long-term maintenance of an app. In addition, more and more companies are switching to microservices. Again, this is the sphere where Java is already well-established. Frameworks such as Spring help create microservices with ease. Native image technology enables developers to build small containers. Java’s cross-platform capabilities allow the development using different architectures and OS, and Liberica Native Image Kit makes it possible to use other programming languages.

Early in the beginning, Java had significant vulnerabilities and issues related to sandbox implementation. Now, although security patches are introduced with every release, hundreds of new issues are revealed.

👍 Modern Java is no less secure than any other language. Based on a recent WhiteSource study, there is no language considered “most secure”. Java, however, has the advantage of a strong community. Thousands of professionals search for and eliminate bugs and vulnerabilities. The OpenJDK Vulnerability Group reviews and fixes reported vulnerabilities and integrates patches into upcoming JDK releases.

New invigorated Java still kicks ass!

We heard the arguments of both sides, so what’s the verdict? Is Java dying or getting better?

Java may be criticized or hated, but it will be used. The community of Java developers has already passed 8 million people worldwide. Every year, Java gets downloaded about one billion times. Its security enables good protection of sensitive data. Its performance is perfect for cloud development. Its features, tools, and wide range of libraries enable companies to create extensive applications or massive networks of microservices and sustain them for many years. The community works together on the rapid improvement of the language in answer to contemporary challenges and needs.

Like it or not, Java is there to stay. And we are looking forward to seeing what else it has in store!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

Community of people who use Java™, one of the most versatile programming languages.