Live data from Hacker News

Java 25 officially released

mail.openjdk.org

161–170 of 260 posts

Re: Java 25 officially released

#161
post #97
post #90

Earlier quoted context omitted.

There has been a move in the past 8 years away from Java on the back end, notably to Go, by several large engineering organizations, which made the move, "motivated" by the example of companies like Google or by projects like Kubernetes, and seduced by the promises of a language simple to learn, build, and deploy.

> seduced by the promises of a language simple to learn, build, and deploy That's actually quite correct and I'm saying this as someone that does Java on daily basis. Go is in fact superior in terms of deployment. I would rather deploy a Go-written service than a Spring Boot one. That being said, I love using Java for monoliths - large code bases crammed with business logic. I personally don't see Go doing very well…

What deployment challenges have you had with Java / spring boot apps? It has been totally smooth sailing for me.

Re: Java 25 officially released

#162
post #139

Earlier quoted context omitted.

The different JDK builds are almost all built from OpenJDK. Maven and Gradle cover nearly all use cases. The complexity is not that high.

I think it is quite high, especially for newcomers to the ecosystem. The popular sdkman CLI tool for managing JDK installations provides 17 different JDKs to install: https://sdkman.io/jdks/ With the DotNet SDK for comparisons sake, there is but one provider, and package management is provided as first class citizen in the compiler CLI, removing the need to even pick a "gradle" or "maven" style build tool in the firs…

At the very top of the page it mentions a default which kind of negates that issue...

Re: Java 25 officially released

#163
post #143
post #79

Earlier quoted context omitted.

The move from javax to jakarta was not really connected to the changes in the language. It is very much recommended to not do these upgrades simultaneously.

Right. It was a copyright issue, I know. We didn’t do that one giant jump. We moved from 8 to 17 in one step, then in a separate step upgraded Tomcat requiring the jakarta changes later. I guess I tend to think of them as one “modernizing“ combo even though they’re not.

Indeed, exactly the same process we did.

Re: Java 25 officially released

#164
post #87
post #78

Earlier quoted context omitted.

Not comparable; Python 3 changed the source language. While for most programs complying with standard Java nothing had to be changed at all.

Yes it was, your Java 8 code won't compile in Java 9, if using anything that was removed or blocked due to the modules changes, library and runtime are part of the language. A programming language isn't only grammar and semantics.

The affected APIs were from packages where is is easy to tell from the name that they were not part of the standard.

These can be very useful in certain circumstances, but it should have always been clear that there is a risk they could one day be changed in an incompatible way or removed.

Re: Java 25 officially released

#165
post #97

Earlier quoted context omitted.

> seduced by the promises of a language simple to learn, build, and deploy That's actually quite correct and I'm saying this as someone that does Java on daily basis. Go is in fact superior in terms of deployment. I would rather deploy a Go-written service than a Spring Boot one. That being said, I love using Java for monoliths - large code bases crammed with business logic. I personally don't see Go doing very well…

Why is it so ? Is go specifically lacking somewhere ?

I'm not them, but there are few things better for operational insight than the JVM. It has a boatload of tuneables, it has a very rich dynamic code load mechanism (Reflection, ClassLoaders, the new Modules system, and it used to have a strong sandboxing system but they killed that), and at the intersection of those two things is JMX, which is dynamically tuneable deployments via API. It's like having JVM-local feature-flags that one can twiddle without needing to bring down the JVM

And sure, it's not everyone's cup of tea, and/or plenty of people will chime in with "yes, but"s to defend golang or every other platform that isn't the JVM. I'm not yucking your yum! I'm just saying for me, the JVM is the bees knees

Re: Java 25 officially released

#166
post #130
post #54

Earlier quoted context omitted.

I'm rooting against Kotlin since it appears to be only usable with the JetBrains ide. I'm totally blind and Jetbrains tools are not nearly as accessible or easy to use as VS Code with all the Java extensions in my experience. At all the jobs I've had no one cared if I didn't use Idea, but considering it looks like there's no good VS Code tooling for Kotlin if I have to use Kotlin professionally it's going to be painf…

Oh I didn't know about that. Is JetBrains improving on accessibility, at least, or not really?

What's unexpected about that observation is that they have actually completely separated the presentation layer from the business logic because such a thing was required to have "Code with Me" and their "projector" project wherein one could use IJ from a browser https://jetbrains.github.io/projector-client/mkdocs/latest/a...

But, I am fully talking out of school because I don't know what the actual, no kidding, accessibility hurdles one faces when trying to do work in such a setup, nor what concessions VS Code has made to fix those problems

But I do know that YouTrack has a dedicated categorization for accessibility reports and I am sure they would welcome hearing about how they could win back those audiences https://youtrack.jetbrains.com/issues?q=%23%7BUI.%20Accessib...

Re: Java 25 officially released

#167

Earlier quoted context omitted.

I've been trying Java recently with IntelliJ and it's been funny watching Java's evolution from the IDE's suggestions. In Java a lot of code looks like this void foo(Bar bar); where Bar is an interface, and in many cases it only has one single method, so it looks like a callback that must be wrapped inside a class. Fortunately, Java lets you create anonymous classes to use these methods. void foo(new Bar { @override…

Doesn't java now let you have both private methods in interfaces and default implementations of the interface methods?

    $ cat Foo.java
    interface Foo {
        private String jimbo() {
            return "yup";
        }
    }

    $ javap -c -private Foo
    Compiled from "Foo.java"
    interface Foo {
      private java.lang.String jimbo();
        Code:
           0: ldc           #1                  // String yup
           2: areturn
    }
and

    interface Bar {
      default boolean isAwesome() {
        return true;
      }
    }

Re: Java 25 officially released

#168

Earlier quoted context omitted.

Neat, I wrote some swing apps back in the day that I've thought about resurrecting, but didn't want to have to do much modifying since they are mostly toys, though useful to me. I'm gonna give it a try!

Is Swing good now? Usually when people say Java is good now I assume they're not talking about Swing.

As a point of reference, JetBrains platform is on top of swing, and I'd guess that's a significant contributor to why they're able to deliver consistently across Linux, macOS, and Windows. Unlike Eclipse SWT which ships native code for all the platforms it targets

Re: Java 25 officially released

#169
post #158
post #5

Java has been such an amazingly solid technological foundation... and for a long, long time! It may not be the most sexy language but it's been a stable one. We have applications created with Java 1.4 running happily on Java 21 LTS and expect to upgrade to this latest LTS (Java 25) soon. Java for the win!

I disagree. That has not been my experience whatsoever. Every company I helped, and it's been dozens, had struggles moving to a new versions of the JVM. Every single time there were major issues that required a lot of re-work and re-testing. I bailed around Java 17 or 18, but it didn't matter because NOBODY I was working with was actually even using that version! On one particularly bad project in 2022, a client had…

This must be satire

Re: Java 25 officially released

#170
post #164
post #87

Earlier quoted context omitted.

Yes it was, your Java 8 code won't compile in Java 9, if using anything that was removed or blocked due to the modules changes, library and runtime are part of the language. A programming language isn't only grammar and semantics.

The affected APIs were from packages where is is easy to tell from the name that they were not part of the standard. These can be very useful in certain circumstances, but it should have always been clear that there is a risk they could one day be changed in an incompatible way or removed.

Does not change the fact that existing code, or existing JARs could not run any longer, and had to be rewriten.

When code breaks, the user doesn't care about the details of the root cause, it stays broken.

Post reply on HN