TAG · 6 ARTICLES

#java-ai

AI in Java

  1. AIWhy Python isn't the only way to build AIEveryone says AI means Python. That is true for training models, and even there Python is only the remote control. But most developers will never train a model. They will build apps around one, and that is backend work in whatever language your backend already speaks.17 Nov 2026 · 6 min
  2. JAVACall an LLM API from plain Java with HttpClient and JSONNo framework, no SDK. Just java.net.http.HttpClient, a few records and Jackson. One small client that talks to a local model or a cloud API by changing three settings, with error handling, retries and streaming.17 Nov 2026 · 8 min
  3. JAVAHow LLMs work: tokens, context windows and temperatureYou don't need the maths. You do need to know why the model forgets everything, why long chats cost more, and which temperature to use. Here is how an LLM works, explained for the Java code you will write.17 Nov 2026 · 9 min
  4. JAVAJava 21 features for AI apps: records, sealed types and moreLLM code has three hard parts: messy JSON, replies that come in many shapes, and calls that take seconds. Modern Java has a feature for each. Here is how records, sealed types, pattern matching, text blocks and virtual threads fit AI work.17 Nov 2026 · 8 min
  5. JAVASpring AI ChatClient: prompts, templates and model switchingThe HTTP call from part 3, now done the Spring way. Set up Spring AI 2.0 with a local model, talk to it with ChatClient, use prompt templates, get Java records back, stream, remember the conversation, and switch providers without changing code.17 Nov 2026 · 9 min
  6. JAVAWhy Java for AI? Where Java fits next to PythonPython trains the models. But most AI work today is building the app around a model, and that is the kind of work Java has done well for decades. Here is an honest map of who does what.17 Nov 2026 · 8 min