Scrivio Interview library
LeadershipPrincipal5 min read · updated 12 November 2026

Machine learning in the enterprise has moved from Java-based tools such as Weka and Mahout to Python ecosystems, and now to LLM APIs. What does this history imply for how a Java-heavy company should organise ML and AI work?

The history says that research and training consolidated on Python, so a Java-heavy company should let data science work in Python and not fight it. Java stays strong for production services, data pipelines and integration, joined to Python through standard formats such as ONNX, APIs and model servers, while LLM APIs have moved much AI work to application developers who now need skills in prompts, retrieval, evaluation and security. A platform team should own serving, evaluation and governance, and the company should avoid betting on niche Java ML frameworks without strong communities.

Why this question is asked

A company whose systems are mostly Java faces a real organisational question with every wave of machine learning: should AI work happen in our main language and teams, or somewhere else? The answer has changed twice in fifteen years, and leaders who learned the lesson of the first change make better decisions about the current one. Interviewers ask this to see whether we can read technology history for its lessons and turn them into team structure and investment choices. In this answer, we will walk through the three eras, then draw the organisational implications one at a time.

1Three Eras of Enterprise Machine Learning

Around 2010, Java looked like a natural home for machine learning in companies. Weka, a Java workbench from the University of Waikato, was widely taught, and Apache Mahout offered scalable algorithms on Hadoop MapReduce, which was itself a Java ecosystem. Big data meant the JVM.

Then deep learning arrived, and the research community standardised on Python with NumPy, then TensorFlow and PyTorch. Notebooks, GPU support and new papers all appeared in Python first. Mahout's MapReduce algorithms were deprecated, and the project shrank to a small community. Companies that had built their ML on it had to migrate.

Since about 2023, a third era has begun. Large language models are reached through APIs from providers or self-hosted servers, so building an AI feature often means calling a model over HTTP, retrieving the right data and checking the answers. That is application development, which is exactly what Java teams already do.

What each era changed
EraCentre of gravityLesson for a Java company
About 2008 to 2014Weka, Mahout on Hadoopniche frameworks can lose their community
About 2015 to 2022Python, TensorFlow, PyTorchtraining belongs where research happens
2023 onwardsLLM APIs and frameworksapplication teams build much of the AI work

2Let Data Science Work in Python

The first implication is not to fight the Python ecosystem. New models, libraries, tutorials and hires all arrive there first. Forcing data scientists to train in Java would slow them down and make hiring harder, and the company would still fall behind. So training, experimentation and model analysis stay in Python, with the tools data scientists know.

This is not a defeat for Java. It is a division of labour that plays to each ecosystem's strength.

3Keep Java for Production, and Bridge With Standards

Java remains very strong where models meet the business: services with strict latency and reliability requirements, data pipelines with Kafka or Spark, and integration with existing systems, security and transactions. The question is how to cross from Python training to Java serving without tight coupling.

There are three standard bridges. A model format such as ONNX lets a Python-trained model run inside a Java service with ONNX Runtime. A model server with a clear API, REST or gRPC, lets Python serve the model and Java call it. And LLM provider APIs are language-neutral by design. Choosing standards over custom glue means either side can change its internals without breaking the other.

4Grow LLM Skills in the Application Teams

Because LLMs are used through APIs, much AI work now belongs to application developers rather than data scientists. Java teams using Spring AI or LangChain4j need new skills: writing and versioning prompts, retrieval-augmented generation, where we fetch relevant documents and give them to the model, evaluation, measuring answer quality with test sets, and AI security, such as prompt injection, where text in the input tricks the model into ignoring its instructions.

A leader should plan training, pair application teams with experienced people early, and treat these as core engineering skills rather than a side hobby.

5A Platform Team for Serving, Evaluation and Governance

If every product team builds its own model hosting, evaluation and safety checks, we pay for the same work many times and get uneven quality. A platform team owns the shared parts: model serving for in-house models, an AI gateway for provider models with cost tracking, evaluation tooling, and governance such as data classification, approval of new use cases and audit logs. Product teams then consume AI safely through stable interfaces.

Step throughHow the work is divided
  1. Product teams (Java)AI features inside business workflows
  2. AI platform teamgateway, model serving, evaluation, governance
  3. Data science (Python)training, experiments, model analysis
  4. Standards between layersONNX, REST or gRPC APIs, provider APIs

4 layers, from the top down. Step through them one at a time.

6Avoid Betting on Niche Frameworks

The last lesson comes straight from Mahout. A framework can be technically good and still lose its community, after which bugs stay unfixed and hiring becomes hard. Before adopting any Java ML or AI library, we look at who maintains it, how many active contributors and releases it has, and how hard it would be to replace. We prefer libraries close to widely used standards, such as ONNX Runtime's official Java API, and wrap less certain ones behind our own interfaces so that leaving them is a contained change.

7Follow-up questions

Does this mean Java developers should learn Python?

Learning enough Python to read notebooks and talk with data scientists is very useful, but they do not need to become Python experts. Their main growth area is the LLM application skills, which apply in Java.

Where do Spring AI and LangChain4j fit given the warning about niche frameworks?

They have active communities and corporate backing, which lowers the risk, but their APIs still change between releases. We keep business logic in our own code and use the frameworks for the integration layer, so an upgrade or a switch is limited in scope.

Should the platform team also build AI features?

Mostly no. If it builds features, it competes with product teams for priorities and neglects the platform. It can build one or two early features together with a product team to prove the platform works.

8Conclusion

In this answer, we read three eras of enterprise machine learning: Java tools like Weka and Mahout, the consolidation on Python, and the current era of LLM APIs. From them we drew the organisation: data science in Python, Java for production and integration bridged by ONNX and APIs, LLM skills in application teams, a platform team for serving, evaluation and governance, and caution about niche frameworks.

What to say in the interviewAbout 80 seconds aloud

Open with

I read the history as a clear lesson. Around 2010 Java looked like the home of enterprise ML, with Weka and Mahout on Hadoop. Then deep learning consolidated on Python, Mahout's MapReduce work was deprecated, and companies that had built on it had to migrate.

Then, if they want more

So first, I would not fight Python: data scientists train and experiment in Python, because that is where models, libraries and hires are. Second, Java stays where it is strong, production services, pipelines and integration, and we bridge with standards rather than glue: ONNX for running models in the JVM, model servers with clear APIs, and provider APIs for LLMs.

Third, LLMs moved a lot of AI work into application development, so our Java teams need real skills in prompts, retrieval, evaluation and AI security, and I would invest in training for that.

Fourth, I would set up a platform team that owns model serving, the AI gateway, evaluation and governance, so product teams can consume AI safely without each rebuilding it.

And finally, before adopting any Java ML framework, I would check its community and maintenance, and wrap it behind our own interfaces, because Mahout shows that good technology can still lose its community.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Spring AI reference
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Machine learning in the enterprise has moved from Java-based tools such as Weka and...": https://scrivio-interview-library.netlify.app/spring-boot/llm-fundamentals/d08024faff/