News for hackers. Stuff that matters.
Re:2026: The Year of Java in the Terminal by voidfunc on Wednesday December 31, 2025 @12:19PM (#46446102)
jpackage

It does all of this work for you and its a standard tool that dumps out a platform specific application bundle.

The only people living in 2010 are the ones that choose to live there with incredibly outdated takes on things they dont understand.

Re:2026: The Year of Java in the Terminal by fweimer on Wednesday December 31, 2025 @01:36PM (#46446913)
Bundling the JRE in the bundle typically results in something that is not redistributable with the default OpenJDK license: The Java ecosystem is heavily tilted towards the Apache license, but Hotspot is licensed under the GPL v2 only (no classpath exception). The Apache license and older GPL versions (before 3) are generally assumed to be incompatible.
Re:2026: The Year of Java in the Terminal by winrid on Wednesday December 31, 2025 @07:52PM (#46450048)
Every modern openjdk build is licensed as GPLv2 + classpath exception. That exception includes hotspot, since it's part of the jvm. That exemption allows shipping the JVM with your app or linking to it. Otherwise a bunch of enterprise software couldn't exist.
Re:2026: The Year of Java in the Terminal by maxandersen on Thursday January 01, 2026 @09:46AM (#46454534)
This is not true.

Even Eclipse and Intellij ship openjdk based runtimes with their distributions and have even stricter GPL limits.

Re:2026: The Year of Java in the Terminal by vips7L on Wednesday December 31, 2025 @12:27PM (#46446195)
Has jpackage been updated to create things that are not installers and don't extract themselves into several files?
Re:2026: The Year of Java in the Terminal by voidfunc on Wednesday December 31, 2025 @12:47PM (#46446422)
You're asking about a fundamentally different thing.

An app bundle (.app, .rpm, .deb, .msi/.exe etc.) are things jpackage can build for you and are a single shippable artifact for a user with a JRE included so they don't need to do that. It's designed to make it easy to ship Java applications around.

If you want a fully statically linked binary you're diving into graalvm and native-image: https://www.graalvm.org/latest/reference-manual/native-image.... This will give you what you want which is basically something you can wget and chmod +x.

Re:2026: The Year of Java in the Terminal by vips7L on Wednesday December 31, 2025 @12:49PM (#46446442)
I'm not asking about a fundamentally different thing. The success of other languages isn't because they produce installers. Have you tried native image for a non-trivial application? I've been using it since it came out; I was the first adopter of native-image for Quarkus on Windows. I even wrote the documentation for it at the time. It is not trivial to use, the compile times are extremely long, and the resources it requires are sometimes more than a developers machine can provide.
Re:2026: The Year of Java in the Terminal by pdntspa on Wednesday December 31, 2025 @01:00PM (#46446571)
Every time I've tried to get native-image working with anything more than a basic Swing app it has been absolute hell.
Re:2026: The Year of Java in the Terminal by nineteen999 on Wednesday December 31, 2025 @09:52PM (#46450848)
> platform specific

Write once, run everywhere.

Re:2026: The Year of Java in the Terminal by voidfunc on Thursday January 01, 2026 @04:53PM (#46458475)
java -jar <jar-file>

Or use a graal to build a native-image and ship that around.

But that's not what people want. They want an .exe or a .app, or .rpm, or whatever. That's a container for holding that .jar and it is platform specific and there is no workaround to that problem.