Live data from Hacker News

Java 25 officially released

mail.openjdk.org

31–40 of 260 posts

Re: Java 25 officially released

#31
post #2

New Features: https://openjdk.org/projects/jdk/25/ Java 25 is an LTS release.

Can't wait to have a job migrating an application from 17 to java 25 in 10 years!

I wouldn't expect migrating from 17 to 25 to be an awful lot of work. The hard bump was moving from Java 8 to 9+ (11, typically), due to the introduction of the module system, removal of APIs previously shipped with the JDK (e.g. JAXB), etc. Things get much easier once you've passed this hurdle. Adopting 17 posed another, usually smaller, challenge due to reflection not working OOTB like before, but I'm not aware of other, equally disruptive changes after 17.

Re: Java 25 officially released

#32

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.

Swing is swing, it's as good as it's always been (eye of the beholder). As I understand it, it hasn't completely rotted on the shelf, they've made updates to the rendering to better leverage modern hardware, but it's not a modern toolkit by any means. But it is maintained, it still works.

JavaFX is good (I really like FX), and maintained, and portable. They just came out with 25 I think. But it's a completely different model than Swing.

Re: Java 25 officially released

#33

(not a Java developer, no dog in this fight) I'm not sure I like the module import system very much. I think `import *`-like constructions make code a bit easier to write, but much harder to read, especially for developers new to the language / codebase. C# and Nim love that style, and it makes them almost unreadable without a good IDE. Personally, I much prefer Python's "short aliases" style, e.g. `import torch.nn.f…

so module imports looks to be different from normal imports and actually helps reduce the number of imports the developer needs to write. FWIW Scala (which runs on java) does have import renaming and also type aliases which can do what you mentioned.

Re: Java 25 officially released

#34
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!

The JVM and its ecosystem can be used from other languages too like Scala which has all the sexy stuff, also clojure et al

Re: Java 25 officially released

#35

Earlier quoted context omitted.

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

No, swing is pretty out of fashion if not deprecated. I know it pretty well, but still wouldn't choose it if starting a new project today. I'd use Qt, though if you're not comfortable with C++ I've been told JavaFX is pretty good

ive tried javafx but its always easier to me to go back to swing, if it aint broke dont fix it.

Re: Java 25 officially released

#36
post #11

What is the current situation of using Java (from legal standpoint)? In open source and in commercial setting? Oracle has a lot of fantastic technology locked up in Java (things like Truffle), how reasonable it is for new projects?

The only real nut right now is, if you're using the Oracle distributions, only the latest LTS is, essentially, free to do anything with.

Older releases are under their OTN license, which is only for personal and development, but not production.

Again, this only matters if you want an Oracle sticker on your runtime, OpenJDK and the other projects are full boat "do whateva" JDKs.

Re: Java 25 officially released

#37

Earlier quoted context omitted.

Can't wait to have a job migrating an application from 17 to java 25 in 10 years!

I wouldn't expect migrating from 17 to 25 to be an awful lot of work. The hard bump was moving from Java 8 to 9+ (11, typically), due to the introduction of the module system, removal of APIs previously shipped with the JDK (e.g. JAXB), etc. Things get much easier once you've passed this hurdle. Adopting 17 posed another, usually smaller, challenge due to reflection not working OOTB like before, but I'm not aware of…

Except he didn’t say “for ten years” but “in ten years” referring to the extreme length of time companies take to upgrade

Re: Java 25 officially released

#38
post #33

(not a Java developer, no dog in this fight) I'm not sure I like the module import system very much. I think `import *`-like constructions make code a bit easier to write, but much harder to read, especially for developers new to the language / codebase. C# and Nim love that style, and it makes them almost unreadable without a good IDE. Personally, I much prefer Python's "short aliases" style, e.g. `import torch.nn.f…

so module imports looks to be different from normal imports and actually helps reduce the number of imports the developer needs to write. FWIW Scala (which runs on java) does have import renaming and also type aliases which can do what you mentioned.

C# supports the "using alias" like this:

  using Project = PC.MyCompany.Project;
https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...

Re: Java 25 officially released

#39
More new programs should be written in Java/on the JVM.

Most of the reasons Java dropped out of popularity no longer apply, and at this point it is an incredibly stable and mature ecosystem.

I can come back to a Clojure program I wrote ten years ago and it runs great, meanwhile a TypeScript program I write 6 months ago requires a bunch of updating and cleanup.

Re: Java 25 officially released

#40
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 wonder where Java would be today without superb tooling and smart student programs from JetBrains.

Java has enjoyed powerful IDEs since late 1990's, some of them are even free beer!
Post reply on HN