Live data from Hacker News

The decline and fall of Java on the desktop

jdeploy.substack.com

251–260 of 362 posts

Re: The decline and fall of Java on the desktop

#251

Earlier quoted context omitted.

That's not the fault of the language, though I'd say maybe Kotlin is a considerably better choice nowadays. If by blockly you mean the visual interface, what you said is going to be true for any language. If by blockly you mean javascript, maybe, but honestly if it's an exercise to build foundations (and not just for personal gratification), javascript (or python) isn't much easier for kids than Java, because it has…

> And if there's any fault in the language chosen for AP computer science, the blame should go to the designer of the curriculum. Java was recommended for AP CS 22 years ago. At this point I lay less fault at their feet and I'm more interested in why it's still there at long last. > If by blockly you mean the visual interface, what you said is going to be true for any language. My research isn't published yet but I'v…

Write LOGO first, or scratch then.

Java is a good intermediate step as a first serious programming language - it has good compile time messages, and even more importantly, it has pretty much full runtime safety, which is absent from python, c, javascript et alia. With these languages students will struggle with code that seem to work, yet are faulty - it is better to fail with an “ugly” but readable exceptions during development, than to not do anything just get wrong results (either type errors, non-intuitive conversions, or straight up memory corruption)

Also, java is a tiny language, I really don’t get your point. Sure, hello world requires 3 lines of boilerplate, but other than that you have pretty much listed every single java feature there is. How many languages’ feature list can you enumerate in a rant?

Re: The decline and fall of Java on the desktop

#252
post #180

Earlier quoted context omitted.

I love kotlin and have messed around with javafx + kotlin. It works well once you have set it up.

Do you mean TornadoFX, or some other kind of JavaFX-with-Kotlin?

In Kotlin, you can use any Java library without a wrapper. That includes JavaFX of course.

TornadoFX is only a convenience skin on top of JavaFX to make Kotlin code more concise (but it's heavier also as it adds a lot of code to your application).

Re: The decline and fall of Java on the desktop

#253

Java on desktop in 2022 seems like a lost cause. It's always slow and hogs resources like crazy. A good example is all the Jetbrains IDE's. Try running any of them on a low powered laptop and you end up having a bad time. Luckily there seems to be a push for fully native.

How is that a relevant benchmark? It’s like claiming that c++ is “slow” because look at the memory consumption of this program calculating some big-ass weather model on a cluster of machines..

Intellij does a shit load of thing, caches your files, constantly monitors for changes, etc. It is not vim written in java.

Re: The decline and fall of Java on the desktop

#254

Earlier quoted context omitted.

Why should it change? Java is one of the most popular languages used today

As discussed in the article, it's slow and has compatability/portability issues. And I don't really want to play the log4j card, but...

It's not as fast as C/C++, but its faster than most languages in heavy use these days

Re: The decline and fall of Java on the desktop

#255
imagine an article about the decline of desktop java not mentioning the role of the microsoft bundled jre that basically broke most applications by default. the java ecosystem took a couple years to get out of that issue properly in ways that non techie coulod follow, but the bad experience stuck in the collective user minds up till this day.

Re: The decline and fall of Java on the desktop

#256
post #248
post #241

Earlier quoted context omitted.

> Look at ZGC GC. I did, it caused huge pauses with my application (I think probably a bug). > But also the default GC, while on default being more throughput preferring can be tuned by a single paramater. Sure, but how many people will do even that much tuning? Defaults are important, and IMO Java chooses a bad one; responsive by default and tuneable when you need maximum throughput is better than the reverse. (I su…

That’s not how it works. It’s not like Java’s GCs in the last decade had any sort of huge pauses unless the program did some stupid shit like allocation in a hot loop. (G1GC, the default since 9 promises by default a 10ms max pause time and it can uphold that under crazy conditions even — and even after that it will get progressively slower instead of a huge increase) Java’s GCs are the state of the art, if they stru…

> That’s not how it works. It’s not like Java’s GCs in the last decade had any sort of huge pauses unless the program did some stupid shit like allocation in a hot loop.

Or there's a bug. There's a reason ZGC is marked as experimental. G1GC handled the application in question fine, we reverted to that and it wasn't worth our time investigating further.

Re: The decline and fall of Java on the desktop

#257

Successfully using JavaFX (or OpenJFX as it is now called) in a mission-critical cross-platform app with 50k+ installs. It’s not that bad really. Package size and RAM usage is a bit of an issue, as we bundle it with a jlink’ed (stripped down to what is needed, thanks to Java 9 modules) JDK. Other options like Electron or native Windows/macOS wrappers around a shared core written in C++ were discussed but ultimately d…

Last time I used jlink it produced a bunch of folders and a shell file to launch. Is it possible to make it a single binary executable instead (preferrably without GraalVM)? Also I tried to get rid of unused classes using Proguard, but there are zero tutorials for non-Android java apps.

You need jpackage for that, which will create a native executable (unfortunately only for the given platform)

Re: The decline and fall of Java on the desktop

#258

Java on desktop in 2022 seems like a lost cause. It's always slow and hogs resources like crazy. A good example is all the Jetbrains IDE's. Try running any of them on a low powered laptop and you end up having a bad time. Luckily there seems to be a push for fully native.

> Luckily there seems to be a push for fully native.

Really? I thought there was a push for Electron/Chromium everywhere (which seems comparable or worse than desktop Java...)

Re: The decline and fall of Java on the desktop

#259

This article seems quite off. First, it conflates browser and desktop. Yes, applets died an early and deserved death. That is different from what happened with desktop apps. A univeral GUI (e.g. Swing) was wrong-headed. I don't actually know what happened after people moved away from Swing. But even in the time range TFA discusses, Intellij IDEA, an IDE written in Java, was a success. It has always been multi-platfor…

On the contrary. Jetbrains IDE's prove the fact that no matter how much you engineer, a java based desktop application will always be slow and eat huge amounts of resources.

I think I have already answered you regarding it, but Jetbrains IDE’s are not resource-hungry because of Java but because they index/cache the code base. You can’t draw meaningful conclusions from that.

Re: The decline and fall of Java on the desktop

#260
post #92

Earlier quoted context omitted.

Oracle certainly wasn't good for Java. But Java-on-the-desktop had been struggling for years before that. You either bundled a complete JVM with your application (fine if you're making a 500MB IDE, not so good for anything smaller) or you had the embarrassment of directing your users to an installer that bundled the Ask toolbar. They might even end up with the security-hole-riddled java browser plugin. And even once…

In fact Oracle saved Java. Sun was struggling and Java was stagnant at the time. There was hardly any big innovation in the last years under (the) Sun. Java Modules started in the Sun age, but they didn't get it out of the door. J2EE / Java EE was also kind of dozed off. So, while Oracle is for sure not the most sympathetic company, it is good at execution.

2005-2006 brought as generics and EJB3. Quite the opposite of stagnation.
Post reply on HN