Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • Love Java vs Hate Oracle... My life is a shit show
  • Java is open source and you can get jvm and jdk from other vendors (eg: Red Hat).

    You can essentially live all your java life without ever interacting with Oracle.

    by znpy
  • I mean, thanks to crazy data center over-investment there is real chance that Oracle will need to sell some of their assets. Somehow I can't imagine many potential buyers that would be a good custodian of Java.
  • > Twelfth Incubator

    Are you sure this egg is actually viable?

    I mean, I'd love to see it, but...

    by rf15
  • The JDK team made a decision awhile ago to hold the Vector API until value types are final. That's why the API has been incubating so long.
  • Java consistently introduces lots of exciting functionality into the language. That's a big part of my dislike and active avoidance of it.
  • In the absence of a sarcasm tag, would you care to explain your reasoning?
  • I've been using the Vector APIs for years now, and I'm still waiting for them to GA!

    They are useful for neural information retrieval (RAG, memory), which relies heavily on content vectorization and similarity matching using their dot products.

  • Not a fan of JEP-531, looks the repeat of Optional. Are we really so afraid of extending syntax that we are going to add a class instead of field modifier?

        private static final Logger log = Logger.getLogger(Whatever.class);
    
    This was already verbose enough that Lombok has @Log4j for it, adding `lazy` keyword in front of `final` won't make it any worse.
  • Still pretty fun that here banks are still using Java 8, where i work they use java 17 and you can still find work requirements asking for java 7 (mostly in goverment entities)
  • But why? Surely you can just run the original code on the new version?
  • That's one benefit of using Java actually. You can always find Java developers.
  • This thread, which I read most of, reads like a 'how to be a language-war thread without explicitly being one'. :)

    Just use the language the (keeps putting) puts bread on your table. All languages have their own 'baggage'.

    Wrt to AI, I agree with pron's comments that for very large code bases, AI can't do 4$hit.

  • Project Valhalla will go into Java 28 (next year, and preview version).

    Fingers crossed I'll manage to use null type safety in my lifetime.

  • A first step of Valhalla that is ...
  • You really need to dare to try something else, Kotlin has been available for many years and the cost for a Java shop is super small since the same tools work with both. I’ve used also Dart which is lots of fun. Even Typescript can be a good alternative depending on what you’re doing. All have nullability guarantees and a nicer type system than Java while being in the same ballpark in terms of performance.
  • NullAway with JSpecify annotations are a really good way to add null safety to Java applications. Even enforces nullability at the generic level.
  • universal null type safety has sadly been discarded as a core concept of Valhalla in my Understanding; that being said, the proposals in Valhalla have null-safety as a side effect, but only under certain conditions.
    by rf15
  • > Project Valhalla will go into Java 28

    Unfortunatley without specialized generics and without the performance benefits that are supposed to come with it. They were too slow with Valhalla.

  • Serious question: when should one use Java for greenfield projects in 2026?
  • When you think a garbage collected language is a good fit for whatever you're building?
  • When you are already familiar with it or work in a Java shop, there are better options if you are starting from scratch, but if you already have 50 guys that know Java it's a pretty big ask for all of them to switch.
  • Good question - am using for a greenfield AI startup in SF. Been a great decision so far: great ecosystem, bulletproof runtime, fantastic performance and new quality features arriving on a steady schedule. "Boring technology" at its finest.

    At the risk of a shameless plug - blogged about it recently at https://mandeepgill.net/2026/08/31/java-for-an-ai-startup/

  • It's a stable known stack. It's not hard to find Java developers and the AI Agents are probably pretty good at writing Java too. A Java backend will just sit there and do its job happily forever and you can bolt on whatever front-end you want. Spring Boot has been kind of the standard way to do Java web applications for probably a decade if not longer. It works fine has all the bells and whistles when you're ready for them and most Java developers who work on the web know Spring already.

    As for an individual developer doing a side project, you should use Java if you haven't used it before to get exposure to it. It's a fundamental component of enterprise software and if you've never used it before take the time to learn something new.

  • Java & Spring is a good choice whenever you want your application to work and be maintainable 10 years from now, without having to replace the framework and half of the libraries you used. I see few good reasons to ever use something with unstable ecosystem (like Javascript with NodeJS) over Java these days.
  • When building boring web applications with a sizeable team that need to run for a long time. Hiring developers is easy since there are many, there is nearly no magic and the language is quite strict and type safe so it works well with a large team.

    And that "team" nowadays may also consist of many AI agents. In my experience Claude Code for example works very well with a typed, slightly boring language with lots of framework and library support. Because it doesn't compile when you get something wrong, instead of getting a vague runtime issue that Claude can't always see.

  • Not at all a bad choice.

    It's stable to the point of boring, and there's no shortage of people who know the language and can work with it, it's got best in class tooling, decades worth of libraries almost all very mature. Most of the language's issues are from legacy code bases coded in a style that isn't really relevant to a greenfield project.

  • These days, Java is mostly used in greenfield software that has to be very reliable, very performant, and last for many years. So it's often the first choice for banking, telecom, finance, government, defence, manufacturing control, logistics and shipping, media streaming, retail, hospitality, healthcare etc.. It's usually not a first pick for more exciting software, such as Python type checkers, JS bundlers, or TUI file managers.
    by pron
  • "The Java Story" documentary by CultRepo on YouTube is pretty great. A major topic is the release cadence which some other comments here are mentioning / joking about.