Java proponents see the language gaining traction in AI and machine learning as AI becomes incorporated into business logic. Credit: FOTOKITA / Shutterstock Can Java give Python a run for its money in the burgeoning, trendy AI space? While Python still gets top billing when it comes to developing for AI, Java proponents see the nearly 30-year-old Java programming language ready to take charge in the AI field. Chief Java steward Oracle sees a “triple play advantage” for Java in AI, leveraging cloud infrastructure as well as frameworks and integration of AI services with business logic. Making Java “even better” for native AI is part of the plan, along with integration with enterprise data and cloud services. “It is a sign of success that there is already a rich set of frameworks and tools to help Java developers leverage AI services,” said Donald Smith, Oracle vice president of product management for the Java platform. “Java developers benefit from strong typing, memory safety, good core libraries, and all the other benefits of Java when using frameworks like these — not to mention, Java is where most enterprise business logic already exists,” Smith said. Java technology vendor Azul also sees a bright future for Java in AI. “The more that AI is incorporated into traditional business logic and those things that need to happen at a true application level, the more that enters the sweet spot of Java and the popularity of Java,” Azul CEO Scott Sellers said. “Python is very limited in terms of performance and scale and those types of things,” he added. Java’s immense popularity gives it a stake in AI, analyst Arnal Dayaratna, research vice president for software development at IDC, said. “Java is incredibly important for AI development because it remains the most popular programming language in the world,” Dayaratna said. “Moreover, Java is the language most widely used within the enterprise, especially for production-grade and mission-critical applications.” Although Java currently does not rival the popularity of Python for machine learning development, Dayaratna expects that it will be increasingly used for AI and generative AI development as applications transition from POC (proof of concept) phases to production-grade usage. Among the native Java AI frameworks cited by Oracle‘s Smith are Tribuo, LangChain4j, and CoreNLP. Tribuo is a machine learning library written in Java that provides tools for classification, regression, clustering, model development, and other capabilities. LangChain4j is a Java version of the LangChain framework for building applications powered by large language models (LLM); its goal is to simplify the integration of LLMs into Java applications. And CoreNLP offers a suite of tools for doing natural language processing in Java. Oracle’s own ambitions for AI in Java call for integrating AI services with business logic via Project Panama, which is the OpenJDK project aimed at interconnecting the JVM and native code, and GraalPy, which is an embeddable, high-performance Python 3 runtime for Java. “We expect to see more integration support over time, just as we have seen Java expand into new technologies over the last 30 years,” Smith said. “Note that innovation in Java projects like Valhalla, Babylon, and Panama help Java run even closer to the native compute that has become synonymous with GenAI.” IDC’s Dayaratna believes it is “eminently possible” that Java will supersede Python for machine learning development. “Java is widely considered more performant and faster than Python,” Dayaratna said. “As organizations begin to leverage generative AI, in particular for more production-grade use cases, Java is likely to increasingly gain traction because of its advantages with respect to resource consumption, application performance, speed of execution, and security.” “It’s also the case that the Java community is investing heavily in improving the syntax of Java and rendering it easier to learn, and this will be another driver for increased adoption of Java for generative AI development,” Dayaratna noted. Related content news JDK 24: The new features in Java 24 12 features are proposed for the next version of Java including compact headers, primitive types in patterns, instanceof, and switch, and linking runtime images without JMODs. By Paul Krill Nov 07, 2024 11 mins Java Programming Languages Software Development how-to 12 Java Enhancement Proposals changing Java Take a tour of the leading in-flight proposals aimed at refactoring the JVM and expanding the Java language. By Matthew Tyson Nov 06, 2024 10 mins Java Programming Languages Software Development analysis Python is the most popular language on GitHub Python was in the spotlight all last month, with a new release and a couple of big wins. Here are our picks for the best news and tutorials for Python developers in October. By Serdar Yegulalp Nov 01, 2024 2 mins Python Programming Languages Software Development feature Python threading and subprocesses explained Python lets you parallelize workloads using threads, subprocesses, or both. Here's what you need to know about Python's thread and process pools and Python threads after Python 3.13. By Serdar Yegulalp Oct 30, 2024 9 mins Concurrency Python Programming Languages Resources Videos