Earlier this year, I wrote an article about how Java would soon overtake Python as the programming language of choice for AI app development.
Back then, Simon Ritter, deputy CTO at Azul Systems, told...
Earlier this year, I wrote an article about how Java would soon overtake Python as the programming language of choice for AI app development.
Back then, Simon Ritter, deputy CTO at Azul Systems, told me that based on Azul research, including a survey of Java developers, Java could encroach on Python’s lead in use for AI development within a year and a half. In fact, Ritter said 2025 would be the last year of Python’s dominance for AI development.
So what can we expect in 2026? In the middle of my research on the topic, I noticed that my old pal James Governor of RedMonk had written a potent piece about Java and agentic systems development. Then just the other day, on our own TNS site, Michael Coté, another astute analyst I know, wrote a piece entitled “Your Enterprise AI Strategy Must Start With Java, Not Python.” So, I knew I was on the right track.
“It’s well known in developer circles that Java is better for developing enterprise AI applications, given better scalability and performance, but right now Python outpaces Java with its libraries and other infrastructure to support the development of AI,” Ritter told The New Stack in a recent interview. “However, enterprises are realizing that Java is the better choice for enterprise-level deployments. We’re likely to see Java outpace Python within the next 18 months to three years.”
Java in the Agentic AI Era
Now, as we are in the agentic AI era, several Java AI agent frameworks and libraries — such as Embabel, Koog, LangChain4j and others — have emerged to support Java developers building AI applications.
Yet the question remains whether Java can catch up to Python in AI development.
“My personal opinion is that the increasing availability of Java frameworks will help close the gap between Python and Java usage and in the AI agent space,” Azul’s Ritter told The New Stack in a recent interview. “Although Python is a very popular language for AI development, core technologies, such as LLMs [large language models] and Torch, are written primarily in C and C++. Python has become popular due to the wide availability of libraries like PyTorch and its perceived ease of use.”
However, “As more Java frameworks and libraries are developed — such as LangChain4j — I think developers will find that Java offers additional, more compelling advantages,” Ritter said. “Java excels at scalability and performance, especially in handling multiple concurrent threads of execution (something Python struggles with). With the exponential increase in usage of AI agents, factors such as performance will become increasingly important.”
A Fighting Chance
Java has a “chance” in this undeclared battle. Some say more than just a chance.
“Java has a chance to catch up to Python for AI apps at the enterprise eventually, but I don’t think that will happen tomorrow,” Andrew Cornwall, an analyst at Forrester Research, told The New Stack.
But “AI researchers are still more comfortable in Python than Java, so Python will see the bleeding edge research first,” he noted. “However, enterprises find Java easier to integrate. Java’s got a more robust cloud ecosystem and more mature tooling. Right now, the industry is struggling to keep up with GenAI [generative AI] advances, so building with a dynamically typed language like Python is faster. Once the pace settles down and patterns become well known, frameworks for Java will be available, and probably more desirable for enterprises.”
Brad Shimmin, an analyst at The Futurum Group, said he does not think that Java will overtake, or “displace” Python as the preferred language for doing data science.
“Honestly, Haskell and Mojo — an extension of Python — stand a better chance of that. As we’ve seen time and again, developers pick a) what they know and b) what they think will get the job done most effectively,” he said. “I think more developers consider building AI outcomes in Python than in Java, simply due to association and familiarity. You can see this if you compare GitHub projects for supportive libraries. Right now, LangChain has approximately 1,132% more stars than LangChain4j. Does that make Python better? Of course not. I think having tools like LangChain4j and Crew4J at the ready is critical, given the number of developers writing mission-critical code in Java. Frankly, a lot of Python code gets refactored into Java — and Scala — in order to deliver mission-critical performance, security, etc.”
But we’re talking about the enterprise.
Asked if he believed Java could overcome Python for AI app development, Dmytro Liubarskyi, LangChain4j creator and Red Hat senior software engineer, replied: “When it comes to integrating LLMs into enterprise applications, I believe it can. Python will likely remain the dominant language for research, experimentation, and prototyping. However, Java is exceptionally well-positioned for production use in enterprise environments.”
Moreover, Liubarskyi added: “Java has long been the de facto standard for building large-scale enterprise systems, and I’m confident it will also become the language of choice for enterprise AI and LLM integration.”
Embabel: Targeting the JVM and the Enterprise
Rod Johnson, the creator of Embabel and also the creator of the widely used Spring Framework, said he believes Java is better suited to building AI apps in the enterprise.
Johnson told The New Stack that he had been doing a lot of machine learning (ML) stuff, mainly in Python, using TensorFlow and PyTorch, and training neural networks.
“So, I decided that it’d be interesting to see what the ideal framework would look like for building agents. And I fairly quickly concluded that for what I wanted to do, and what I think is unlocking the value of existing businesses, the JVM [Java Virtual Machine] is going to be a much better place to do that, because you want to be able to grow that functionality out of the valuable core business functionality you’ve already got, rather than add something that’s alien, that just talks to it,” he said.
Johnson added that “Python’s great for data science, but you’re not talking about that when you’re GenAI enabling business applications. You’re talking about application development, traditional application development, rather than data science or pure ML, and Java has always been probably the single most popular language for building those kinds of applications, and there’s a lot of reason behind that. So therefore, to me, it makes a lot of sense to build it on the JVM and build it on top of Spring, build it on top of the functionality and integrations that people already have, and create something that’s really easy for developers to adopt.”
Spring Boot Advantage
Indeed, Johnson said if a developer understands Spring Boot, they’re going to be up and running with Embabel in under five minutes.
Embabel is an agent framework, initially for the JVM, that is intended not just to play catch-up with Python agent frameworks, but to leapfrog them, Johnson has said in blog posts.
Johnson told The New Stack that as this space matures, people realize that the key adjacency is not calling your LLM or data science. The key adjacency is your existing business functionality and your existing developer skill set. The existing developer skill set in enterprise is Java, he noted.
“So, when you think about it that way, in a GenAI application, you’re calling the LLM over HTTP. It’s not in process. You’re not using anything magical that Python has to do that. It’s typically an HTTP call that’s so simple,” Johnson said.
Better Programming Model
Johnson originally created the Spring Framework to deliver a better programming model for enterprise Java, and now Embabel is aimed at doing the same for building JVM-based AI agents.
Johnson explained that, in Python, you create a state machine; in Embabel, you deploy your actions, and the framework can work out what order to run those actions in to achieve the goal. It’s the framework that’s doing it, using a planning approach called goal-oriented action planning.
“And the beauty of it is that it’s both smart, but it’s deterministic, so the framework will be able to tell you why it did that, and if it finds itself with the same input objects, again, it will do the same thing,” he said. That is “definitely a valuable differentiator in enterprise, because explainability is critical,” Johnson said. “Determinism is critical, and I believe Embabel is the only framework that is absolutely directly focused on that while retaining the ability to be smart, and like you add more actions and can do more things that you didn’t explicitly program.”
Why Kotlin
Embabel is written in Kotlin, a modern, statically typed programming language from JetBrains, known for its conciseness and interoperability with Java as it targets the JVM.
“I personally prefer programming in Kotlin to programming in Java,” Johnson said. Moreover, “we feel our velocity in developing the framework will be faster in Kotlin rather than Java, but we have written most of our sample applications and quite a lot of our internal applications in Java.”
JetBrains Koog
Koog is JetBrains’ Kotlin-native framework for creating AI agents that run locally, interact with tools and automate complex tasks. JetBrains created Kotlin as a JVM-based alternative to Java that is known for its conciseness, null safety features and full interoperability with Java.
“For many enterprises, Python is not considered a production-ready language, even though most modern AI tools are built on it,” Vadim Briliantov, tech lead for Koog at JetBrains, told The New Stack. “That puts developers who normally work in type-safe languages like Java or Kotlin in a tough spot. Koog effectively bridges this gap, offering these developers a long-needed solution, and abstracts a lot of the ‘AI glue code’ away from devs who don’t necessarily follow all the ML literature in a type-safe way.”
Meanwhile, Briliantov echoes what Johnson said about Python versus Java regarding...