News for hackers. Stuff that matters.
Re:Java 21 makes me like Java again by chii on Saturday September 16, 2023 @11:41PM (#37541294)
> not so great if you want to distribute software for people who are not software savvy, who typically just wants to download one file, install and start using it.

i think it's a flaw that wasn't considered properly in the standard java toolchain to not produce an embedded java runtime into a final packaged artifact that is self-executable.

You end up with third party tooling like: https://www.ej-technologies.com/resources/install4j/help/doc... (and https://launch4j.sourceforge.net/ too).

If oracle bundled this tool into the JDK, it would've not been an issue at all.

Re:Java 21 makes me like Java again by pjmlp on Sunday September 17, 2023 @03:36AM (#37542475)
It has existed for 20 years, and already started with Sun.

Having AOT compilers as commercial offerings, was seen as one way to capture value in the Java market, in a culture where most compilers were still commercial, GCC being the exception.

Re:Java 21 makes me like Java again by coldtea on Sunday September 17, 2023 @09:35AM (#37544918)
>It has existed for 20 years, and already started with Sun.

In an anemic way, with mostly third party offerings few people know or care about, and various degrees of pain and shortcoming to their use. It should be a first class feature, and as simple to use as is in Go (including for cross compiling).

In general, if something exists in "some form" for 30+ years in a language, and only a handful of people use it, whereas in another it's used all the time and people from other languages are jealous of how well it works, then the formers "some form" is not a good one.

Re:Java 21 makes me like Java again by pjmlp on Monday September 18, 2023 @02:35AM (#37552964)
Regardless, it exists.
Re:Java 21 makes me like Java again by javcasas on Sunday September 17, 2023 @03:54AM (#37542586)
That wasn't a flaw. It was a "feature". Can yo you think of a way to increase market awareness of Java other than putting an icon on every computer in the world saying "Your Java needs to be updated" every two weeks?
Re:Java 21 makes me like Java again by nvm0n2 on Sunday September 17, 2023 @05:53AM (#37543264)
There is jpackage and jlink, which don't do single files but make single directory apps.

These days there's also GraalVM native image which does produce Go-like results. But with everyone using Docker on the server anyway it doesn't matter anymore. People who talk about single binaries are confusing to me. What are you doing where shipping one file is so much simpler than shipping a container?

Re:Java 21 makes me like Java again by chii on Sunday September 17, 2023 @06:17AM (#37543442)
> What are you doing where shipping one file is so much simpler than shipping a container?

Desktop applications.

Java would be a more popular desktop application platform if it weren't for the difficulty in this area (which, to be fair, isn't the only difficulty - cross platform is difficult inherently).

Re:Java 21 makes me like Java again by synergy20 on Sunday September 17, 2023 @09:44AM (#37544995)
it's pretty hard for average Joe to install a docker engine before he can pull and run dockers, plus docker is not that great for cross platform desktop GUIs.
Re:Java 21 makes me like Java again by otabdeveloper4 on Sunday September 17, 2023 @11:26AM (#37546048)
> everyone using Docker

Not really.

Re:Java 21 makes me like Java again by vips7L on Sunday September 17, 2023 @02:09PM (#37547809)
jpackage and jlink are shipped in the jdk.