Is Java dead yet? Key figures about Java usage in 2022

Maxime Gamboni (ELCA)
ELCA IT
Published in
7 min readApr 5, 2022

It’s this time of the year again. Spring cleaning, new programming languages!

Is 2022 the year we need to abandon Java and move to more modern languages? Let’s find out.

The popular CI/CD platform Jenkins is 85% Java (photo: Maxime Gamboni)

Popularity

Many indicators tell us that Java is among the most popular programming languages:

  • What do people search for? According to Google Trends, the programming languages most searched for are Python, Java and JavaScript. Python overtook Java in 2019, and it looks like Java is going to get behind JavaScript in 2022. Other languages like C#, Go, Kotlin and TypeScript are far behind. Java and C# both suffer a slow decrease.
Google Trends, scaled to 100% total
  • What programming questions do people ask? According to Stack Overflow Trends, The programming languages people ask the most questions about are Python, JavaScript and Java. Python overtook Java in mid-2018, and JavaScript has kept a stable 10% of questions for almost ten years now. Here again, we see Java and C# both going downwards, while other languages like Go and TypeScript are slowly inching upwards.
StackOverflow Trends
  • Which languages are represented on the Web? The TIOBE Index, which counts the web pages related to various programming languages, tells a somewhat similar story, except for JavaScript which ranks strangely low. Java is second to Python and on a slow downward curve. Unlike other indicators, C# sees slow growth, but we wonder if it is reliable, due to the difficulty of searching for “C#” in search engines. The Go language currently sits at the 13th rank, and Kotlin and TypeScript are far behind the others, at 31st and 40th position, respectively.
www.tiobe.com

Surveys

Automated statistics such as those cited above have flaws. They may have false positives due to programming language names meaning other things (Java is an island…) and false negatives (Spring tutorials are Java tutorials, without “Java” in the name). Java programmers with many years of experience have stopped reading “Java tutorials” and probably ask fewer Java questions on Stack Overflow than beginners. The prevalence of tutorials for a language indicates how many people like teaching the language, not how much it is used.

Programmer surveys may provide better insight into the actual usage of programming languages.

  • JetBrains, the company behind IntelliJ IDEA, conducts annual developer surveys. The surveys show a stable 50% of respondents use Java and nearly 70% use JavaScript. The only languages seeing a significant change over time are Go, TypeScript, and Kotlin (doubled in four years, from 8% to 17%) and again Python which overtook Java in 2019. Only and slightly above 20% of respondents reported using C# but this is almost certainly due to selection bias, as the survey report points out: the results may be slightly shifted towards users of JetBrains products, as they are more likely to take the survey.
JetBrains Surveys: language use

They also asked developers which languages they would like to keep using (“love”) or start using (“want”), and this question neatly separates languages into two groups: Python and JavaScript are the “hip” ones at nearly 50%, and the others are the “mainstream” ones at 30% or below. Only TypeScript may be crossing into the former group in the next few years.

JetBrains Surveys: language popularity
  • Stack Overflow has also been performing annual developer surveys for ten years now. The results are unsurprising: Java and C# are slightly decreasing (with Java enjoying a higher share), and Python is booming. Kotlin and Go are slowly growing but still far below. JavaScript hovers on top of everyone. TypeScript shows a very different picture from the other sources, going from zero to 30% in just five years. It actually overtook C# and is getting close to Java!
StackOverflow Surveys: language use

Code Volume

Popularity is interesting but programming languages are not citizens of a democracy. They don’t get elected by popular vote, but should instead be chosen according to how suitable they are for a task. A relevant parameter for choosing a general-purpose language, and a good indicator of its health, is the number of third-party libraries available. We would not expect a dying language to have many new libraries developed for it.

  • A popular repository of Java third-party libraries is Maven Central. The numbers are clear: more and more artifacts are added year after year (the chart below shows the number of newly published artifacts per year, not the total number). Maven Central takes a bit over two years to double in size. The number of packages published on the Python Package Index is shown for comparison.
New packages published per year
  • GitHub is without contest the largest repository of publicly available source code, which provides useful insight into what language people are writing. The GitHut project uses the GitHub API to compute statistics on which languages are being used by Open Source software. Looking at pull requests per language we see the usual rankings: JavaScript and Python at the top, and Java coming afterward. Go and TypeScript are growing steadily, far ahead of C#, but still several years behind Java if the current trend continues.
GitHut 2.0: fraction of public pull requests

Job Market

A quick look at the Swiss IT job market shows that Swiss companies mostly ask for Java (35%) and Python (30%) expertise, with C# a distant third (16%). Other languages like Go and Kotlin are far behind, with less than two percent of IT job offers.

IT jobs on jobup.ch

Innovations and Corporate Investment

Let us leave numbers and statistics aside for a moment and have a look at current developments and innovations related to the Java ecosystem.

  • Java Features Since 2017, Oracle has adopted a steady release schedule for the Java language and runtime, with a major release every six months. Several major enhancements are planned for this year, such as Valhalla (value types and generics on primitives), Loom (lightweight threading) and Amber (functional programming features like record types and pattern matching).
  • Other languages on the JVM The ubiquity and maturity of the JVM have encouraged other languages like Scala and Kotlin to adopt it as a runtime, along with the Java bytecode format. This is relevant because those languages are interoperable with libraries written in Java. Should Java start losing steam, existing investment in Java applications and libraries can be transferred to those languages.
  • Alternatives to the JVM The relatively slow startup of the JVM makes it ill-suited in situations where it runs for a short time, in particular in serverless environments where Python applications fare better. This is why Oracle developed the GraalVM runtime, which serves as a base for technologies such as Quarkus and Micronaut. That technology makes Java a good choice in a cloud infrastructure. Google is also developing its own runtime ART (formerly Dalvik) to support efficient Java bytecode execution on Android.

Oracle is not the only one investing in the Java platform. Others like IBM (Java is the most represented language in IBM Events of the past three years, slightly ahead of JavaScript, see chart below), RedHat (who brought us Quarkus) Google, Microsoft (with a JDK and dedicated developer resources) and Amazon (also maintaining a JDK distribution and dedicated developer resources).

IBM Events in the past three years

Conclusions

Java has long entered the “Plateau of Productivity” of its hype cycle. Its market share and mind share may be slowly eroding in favor of emerging languages like Go and Kotlin but simultaneously enjoys sustained development and innovations showing no sign of slowing down. The consulting group Gartner said last April that Java has recently acquired a reputation for being old and outdated. Despite this, it remains relevant, and software engineering leaders should encourage the adoption of new Java frameworks to support modern architecture and cloud-native platforms.

C# and the .Net environment, in general, seem to suffer a similar fate as Java. Its market share is slowly eroding, but it is nowhere near “dead” either.

We are watching emerging technologies closely but now is not the time to jump ship. In a recent Go developer survey, about 20% of respondents declared being unable to use Go for now because of missing language features (such as generics and better error handling) or libraries. Most people said that they need better editor features like code completion and navigation as well as refactoring support. Python is seeing an extraordinary jump in popularity, possibly thanks to it being the favorite language for machine learning and data science, which are booming, but it seems ill-suited to large enterprise applications, for which static code verification and refactoring support (and therefore, static typing) is essential. JavaScript is also very popular thanks to being the de facto language of the web and is making inroads in the back-end as well thanks to Node.js, but does not seem suitable for large enterprise applications either, for the same reasons as Python. Typescript is growing and worth watching, but numbers reveal it is still too early.

--

--

Maxime Gamboni (ELCA)
ELCA IT
Writer for

Maxime is a software architect at ELCA, Switzerland.