exabrial 4 hours ago

The JVMin in the last 6-8 years has been a powerhouse of innovation and cool features. Incredibly impressive!

  • panny 4 hours ago

    And a thank you to Oracle for being a good steward of the language.

    • stickfigure 2 hours ago

      I really don't want to upvote this sentiment but I must anyway.

      The fact is, despite Oracle being a menace to the tech industry, Java under their watch is thriving. Which is weird, because I don't know anyone who gives them money for Java. I'm genuinely curious who these companies are and what their incentives are!

      • exabrial an hour ago

        I feel like that tide is changing in general. Not that two wrongs make a right, but don’t forget Microsoft once sold “Linux Licenses”, and then there’s the whole SCO vs IBM debacle. Lawyer driven revenue streams are falling out of style, unfortunately Oracle was a late bloomer. They’ve done an incredible amount of damage to their reputation.

      • didip 2 hours ago

        For real. When Sun got bought, I thought to myself: “At least they would also destroy Java…”.

        But nooo, Java thrives and flourish under Oracle protection.

        • api an hour ago

          Java gets more hate than it deserves. "There are languages everyone complains about and languages nobody uses."

          Most of the hate comes from the overly complicated "enterprise design patterns" crap that took over the ecosystem in the late 90s into the 2000s, not the language itself. It's quite possible to write clean, clear, appropriately complex, well performing Java code.

          On the plus side, of all the languages I've used Java is one of the absolute best when it comes to long term maintainability of code. This is why it's used so heavily in large enterprises with long-lived business critical code bases. Being the "COBOL of the 1990s/2000s" is not an insult, and as a language it is far superior to COBOL in every way. It's not a bad language to program in at all, while COBOL will make you hate your life.

          It's also a safe language unless you break out of the JVM with JNI. It's the first safe language to get huge deployment if you don't count scripting languages. Safe doesn't mean you can't have security bugs of course, it just means you're not likely to have certain kinds of security bugs and stability problems like memory errors.

          The JVM is really a fantastic piece of engineering and IMHO represents a whole direction in computing I feel sad that we didn't take. We opted to stay close to the metal with all the security, portability, code reuse, and other headaches that entails, instead of going into managed execution environments that make all kinds of compatibility and reuse and portability problems mostly go away.

          The biggest current knock against Java I see is JNI, which unlike the core language is absolutely horrible. The second biggest knock is that the JVM is still kind of a memory pig. CPU performance is great, sometimes converging with C or Rust performance depending on work load, but it still hogs RAM.

          • hashmash 17 minutes ago

            > The biggest current knock against Java I see is JNI, which unlike the core language is absolutely horrible.

            JNI was only ever designed to be good enough, and it is. The new FFM API aims to replace JNI in most cases, but it's designed to be "perfect". As a result, the new API took many years to develop, but JNI was quick to develop.

            It would be nice to have the FFM API much sooner, but alternatives like JNR and JNA have been around for a long time. There wasn't a rush to develop a JNI replacement.

          • bheadmaster 28 minutes ago

            In my experience, the problem of Java is the lack of standardized tooling.

            To build an average Java software, you have to install a specific version of JDK, download a specific build system (Ant, Maven, Gradle, Bazel), hope everything works out on the first try - and if not, debug the most-likely-XML spec file searching for invalid dependency that's printed out on the 1000-line error output...

            What Java is desperately missing is something like Python's `uv`.

            ---

            Sibling comment mentioned that debugging Java itself is also a nightmare, which reminds me of the many Spring Boot projects I've had to debug. Stack traces containing 90% of boilerplate code layers, and annotations throwing me from one corner of the codebase to another like a ragdoll...

            Admittedly, that's not inherently the problem of Java, but rather the problem of Spring. However, Spring is very likely to be found in enterprise projects.

          • estimator7292 27 minutes ago

            I hate Java because debugging java code is worse than debugging assembly

            • krior 17 minutes ago

              As a Intellij-user I am more than a little confused. What are features missing from Java's debugging story?

              • eklavya a minute ago

                I have mostly heard these complaints from people who haven't used a java ide and/or do not know that jvms allow waiting for a debugger before starting execution (helps with all sorts of spring or whatever errors and boilerplate).

                That said, there is a shitload of "enterprise" fuckery in Java, but those Devs would have made a mess of any codebase anyway.

    • parttimenerd 14 minutes ago

      And a thank you to all the other amazing companies. The work on the JEP is chiefly sponsored by SAP (with help from Datadog and Amazon).

    • reactordev 3 hours ago

      Surely this is written by an LLM. Paying per core for “enterprise” just because you’re a business isn’t my idea of being a good steward. If anything we should be championing the OpenJDK folks. They are the real heroes.

      • pron 3 hours ago

        The only thing that's paid is support, and the OpenJDK folks are Oracle employees (well, the ~90% of them who do ~95% of the work on OpenJDK). OpenJDK is an Oracle project in the same sense that Chromium is a Google project. In fact, OpenJDK (even more precisely - the OpenJDK JDK) is the name given to Oracle's implementation of the Java SE specification, but we do get contributions from other companies, such as this particular great enhancement to JFR (even external contributions also involve significant work by Oracle employees).

        Anyway, if you don't want to buy a support service, either from Oracle or any of the other companies that sell it, the use of the JDK is free. There is no "enterprise" flavour of the JDK, paid features, or use restrictions as there used to be under Sun's management. Java is obviously freer now - as in beer or in speech - than it was 20 years ago.

        • Moomoomoo309 2 hours ago

          There is an enterprise flavor of the JDK. It's called GraalVM enterprise edition.

          • jiehong 18 minutes ago

            Zulu from Azul might be one? I think it comes with a difference JIT and GC in the enterprise version.

          • pjmlp 2 hours ago

            That has nothing to do with OpenJDK, GraalVM is its own thing.

            • cowsandmilk an hour ago

              You’re the only one who put “Open” in there. Both your parent and grandparent said JDK.

              • pjmlp 5 minutes ago

                Because people keep forgetting Java is like C and C++, there are plenty of JDKs to chose from, and not all of them are related to the same codebase.

              • pron an hour ago

                GraalVM is a separate product developed by an unrelated team. Its enterprise flavour is not considered an enterprise flavour of the JDK. The closest to an enterprise JDK from Oracle I can think of is the "Enterprise Performance Pack" for the 12-year-old Java 8, but it has nothing that isn't in the free and open recent releases (which actually include many more performance enhancements).

                The idea there is that it's cheaper for companies with legacy software that isn't actively maintained to pay for some portion of the performance improvements in modern JVM generations than to ramp up maintenance to upgrade to modern Java, and this can help fund the continued evolution of OpenJDK.

      • ecshafer 3 hours ago

        OpenJDK is the specification implementation. A huge amount of the OpenJDK development is paid for by Oracle (And others).

        • reactordev 3 hours ago

          Because they have a financial interest in rug pulls.

          • Twirrim an hour ago

            What rug pull do you picture could happen at this stage? OpenJDK is the reference spec. Fully open source. Stewarded by multiple companies. Even if Oracle somehow managed to force the whole thing closed source (not sure that's even possible?) you've got all the other contributors who'd "hell no", fork and away you go. Which version of Java do you think the community would go with? There's no way it'd work.

          • dialogbox 2 hours ago

            Why do you think a good steward shouldn't have a financial interest?

      • pjmlp 2 hours ago

        Nope, people keep forgetting no one wanted to buy Sun, not even Google after torpedoing it (which would save them from their J++ like lawsuit).

        IBM kind of thought of it, but ended up withdrawing the offer.

        So the anti-Oracle folks would have seen Java wither and die in version 6, and the MaximeVM technology would never had been released as GraalVM.

      • exabrial 3 hours ago

        `sdk install java 21.0.8.fx-librca`

        No pre-core fee needed.

tombert 3 hours ago

I never thought I would be excited for a new release of Java, but ever since Java 21, I have grown to actually enjoy writing the language. Whomever is running it has really done a good job making the language actually fun to write in the last few years.

okokwhatever an hour ago

The more I search for a new language to learn the more I want to go back to Java. I feel so nostalgic :)

electric_muse 4 hours ago

[flagged]

  • porridgeraisin 4 hours ago

    ChatGPT

    • boroboro4 3 hours ago

      Thank you for telling, I went through their comments and they all like this :-( While having substance very obviously AI generated

    • binary132 4 hours ago

      someone should write an LLM detector bot that just leaves this comment on all AI slop

    • lionkor 4 hours ago

      what?

      • alserio 4 hours ago

        I believe they are saying that the commenter looks a lot like karma farming with an llm, it leaves a lot of comments like this one

        • sumanthvepa 3 hours ago

          What benefit could one possibly get by farming karma on site like hacker news. It's not like one can gather followers or something. I'm always mystified by folks who do this. Would love to understand the motivation.

          • marginalia_nu 3 hours ago

            Having multiple high karma accounts is useful in astroturfing, as moderators are (rightfully) more lenient on established community members than new accounts.

          • diggan 3 hours ago

            Same thing is widespread on reddit, usually for pushing specific products/projects/organizations into the limelight. Landing on the frontpage of reddit/HN drives huge amount of traffic, so obviously "optimizers" learned this, and started priming accounts for future vote-rings and what not, but they need to mix in real-looking content between the pushes so the accounts don't get banned.

zerr 2 hours ago

If you care about performance at that level, you should not be using Java or any other language with a GC.

  • pjmlp 2 hours ago

    Thankfully not everyone agrees.

    https://www.ptc.com/en/products/developer-tools/perc

    We have already have had enough from anti-GC cargo cult from "manual memory management is great" folks.

    Having a GC (which RC is also an algorithm subset), doesn't preclude having other features.

    • OtomotO 2 hours ago

      There is also non manual, non GCed manual management.

      I agree that a GC can be a viable implementation of memory management though.

      • pjmlp 2 hours ago

        There isn't such thing, if you mean Rust, affine types systems require tree structures and have issues with multiple scopes, hence the memes with borrow checker.

        Which I would refer as compiler assisted, although not really a proper term.

        There is a reason outside Rust, everyone else is string to combine GC alongside affine/linear/effects/dependent types instead of one solution for everything.

        The productivity of having a GC, with the type system capabilities to go lower level, when the profiler says so.

        Although I have to conceded, Rust made a great job bringing ATS and Cyclone ideas into mainstream.

        Additionally with AI powered languages, naturally most of this will be automated anyway.

        • OtomotO an hour ago

          Ref counting is also no GC by the definition of a GC I was brought up with.

          But yes, I was also thinking about the borrow checker.

          Not necessarily in Rust, as other languages start to adopt similar techniques.

          • pjmlp 2 minutes ago

            Then somehow someone has taught you badly, any proper CS reference book in academia has it, like the famous GC Handbook,

            https://gchandbook.org/

          • shakna 27 minutes ago

            Maybe not how you were brought up, and people argue... But Watson & Watson, back in '87, described ref counting as "An efficient garbage collection scheme for parallel computer architectures".

            Even the dragon book refers to ref counting as a form of garbage collection.

            Line 2 of Ref counting's Wikipedia page refers to garbage collection.

            People have argued since the invention in 1960, but... Ref counting is one form of GC. [0] It might not be a tracing GC, but it is GC.

            [0] https://dl.acm.org/doi/10.1145/367487.367501

  • mark_l_watson 2 hours ago

    There are ways to mitigate this, the fly weight pattern, etc.