Powerful, scalable, reliable, cost-efficient, and ready to be your next AI language, Java can help modernize critical enterprise applications.
Java is the language used throughout enterprise platforms: ERPs, your ecommerce backends, analytics, logistics, and business workflows. You have decades of code, build pipelines, deployment practices, and operational runbooks all built around the JVM. When it comes to a language for AI though, your first thought might be Python, Node.js and TypeScript, or even Go.
When you’re figuring out what AI features are useful to add to those critical enterprise systems, it may well make sense to experiment in a language like Python. But when it’s time to move from experimentation to production, Java is ready for building AI – and the AI tools that are speeding up developers across the industry are now ready for Java too.
Java is both a foundation for AI-powered systems and a first-class language for building AI applications, especially at enterprise scale.
Java is ready for AI, and AI is ready for Java
One of the reasons Java has remained so popular in the enterprise for so long is how efficient the JVM is, as well as the strength of the ecosystem around it.
Bruno Borges, Principal Product and Community Manager for Java at Microsoft, tells The New Stack, “When you look at benchmarks and compare other language runtimes, the performance and efficiency of those other runtimes, especially Python and Node.js, is very far from what runtimes like the JVM can deliver in terms of cost efficiency.”
That’s even more of an advantage when it comes to AI, where any budget spent on runtime is budget unavailable for tokens and API calls. Efficient Java runtimes also allow you to write efficient, scalable agents: something that’s going to become more important as agents become useful for many more tasks than just writing code. If you have hundreds or thousands of AI agents running in your enterprise, you want them to use as few resources as possible.
“Now that it’s easy to write code with AI, there is really no excuse to not use languages that provide the best runtime performance and great ecosystem.”
You get those same advantages for creating AI features because that Java ecosystem now includes first-class AI frameworks and SDKs for connecting to LLMs. LangChain4j and Spring AI simplify integrating AI models into Java applications and using powerful patterns like RAG while working with familiar Java frameworks; agentic frameworks like embabel add agentic flows to Spring and the JVM. Building chatbots, generating images, summarizing text or creating search services: Java is ready for generative AI as well as the machine learning and big data workloads developers are already familiar with.
Java’s traditional strength in integration is even more relevant as you start adding more AI features to applications, whether that’s MCP or large-scale event-driven architectures.
Julien Dubois, JHipster author and lead of Microsoft’s Java Developer Relations team, tells The New Stack that you need context for AI.
“You want tools, you want databases, you want MCP servers, and Java is great for that because Java has always been great for integrating with third-party solutions,” Dubois says.
The language constructs and the ecosystem of libraries and frameworks for Java make it a good fit for AI, he argues: “it’s not at all difficult for developers to add intelligent capabilities to their existing applications.”
Harder to write, easier to read
Java’s explicitness and verbosity turn into a strength when it comes to using AI code assistants, because it’s easier to read and understand the Java code they suggest adding to your critical, highly optimized enterprise apps.
When an AI agent is doing most of the typing, language choice should come down to readability, argues Borges: “not the shortest, smallest piece of code.”
“AI writes the code, the developer can understand and read their code, and the runtime runs the best performance possible for that particular code with an amazing ecosystem around it.”
Java’s popularity and the convergence around a small set of frameworks have given LLMs plenty of open-source Java code to learn from. The latest versions of AI coding tools like GitHub Copilot, Claude Code, and Cursor are extremely good at writing Java code, Dubois notes. “If you’re a Java developer, you’re probably using frameworks such as Spring Boot, Hibernate, or Elasticsearch: because of the available training data, GitHub Copilot will be excellent at writing this code for you.”
That’s not just useful for adding AI features. The combination of efficient coding assistants and code that developers can quickly understand and review makes it far less expensive to modernize older Java applications you want to update and migrate to the cloud. “Big enterprises have a lot of older Java applications, which have been complicated to update as they require large budgets, and developer motivation is quite low on those projects. AI can drastically reduce that effort and make those projects possible,” Dubois says.
Top comments (0)