Live data from Hacker News

The decline and fall of Java on the desktop

jdeploy.substack.com

241–250 of 362 posts

Re: The decline and fall of Java on the desktop

#241
post #228
post #201

Earlier quoted context omitted.

> The JVM is a beast, why do you think a good deal of all serious web applications run on top of it? The JVM sacrifices latency for throughput, which is good for servers but not for desktops.

Look at ZGC GC. It has less latency due to stop-the-words than what the OS scheduler causes. (Of course at the price of throughput). But also the default GC, while on default being more throughput preferring can be tuned by a single paramater.

> 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 suspect they picked the defaults they did to be competitive against C++ in benchmarks, but we're well past the time where that's what you're competing with).

Same as how Go and Electron have been very successful - not because they're great to work in per se, but because they have so much less friction between writing a hello world program and getting an executable you can distribute.

Re: The decline and fall of Java on the desktop

#243

Cross platform used to mean, windows, mac, and linux. These days it is web, ios, android, windows, mac, and linux. In that order. And that's before you consider TVs, cars, and other equipment where apps are also relevant. These days web is the new cross platform technology. It works everywhere. And mobile is where people focus for native apps. Windows is an afterthought at best. Mac even more. And Linux oddly is now…

> And that's before you consider TVs, cars, and other equipment where apps are also relevant.

Are TV apps really relevant anymore? Chromecast and other similar technologies killed TV apps for me for good.

Re: The decline and fall of Java on the desktop

#244

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.

Re: The decline and fall of Java on the desktop

#245

Earlier quoted context omitted.

> 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…

For just a lesson of writing code to achieve a specific functionality, you can streamline the process a lot by just starting with a template and let students fill in the gaps. So you don't necessarily make them spend time on "public static final void main", but setup a project in which students can type code, build and see results. To teach them to write robotics code, you can create a Robot class for them to play wi…

Matlab has a had OOP for a long time now. It's actually the language where first learned about classes and it provided a fine foundation to later learn more conventional OOP languages like python and c++. I'd say it's a fine language for exploring robotics or anything science related. Compared to pretty much all the competition, it just gets out of your way in anything math-adjecent.

Somewhat ironically, matlab the application is written in Java.

Re: The decline and fall of Java on the desktop

#246
post #38

Earlier quoted context omitted.

I had to use OpenJFX for school recently, and while I still hate the Java language, I had to begrudgingly admit that JavaFX really wasn't that bad at all. It more or less did what I wanted it to do, the resulting GUI didn't look too bad, and it performed well enough. I ended up using it for a Clojure app a bit later. It's good enough to where I think that if JavaFX had come out around the same time as Swing, the Java…

I hate the old school way of writing Java more than any other language. I love writing in "modern" Java more than any other language. Lombok, RxJava/Reactor where possible, and monads everywhere. It is beautiful and succinct, though I totally appreciate it may not always be easy to introduce on older frameworks or legacy projects.

Try Kotlin. Unlike Scala, it's not really a new language, it's more like syntactic sugar.

Re: The decline and fall of Java on the desktop

#247
post #77

The issue with java was users don't care about write once/run anywhere. They care about the program running perfectly on their OS of choice i.e. the java program better look and perform just like a native program (and who can blame them?!). I run tuxguitar once in awhile and it still gets multiple monitors wrong which makes reading music sheets awful by default. (the "fix" is to hard code a resolution in a startup co…

I don't think so. In reality people don't care about native feel, they care about it looking good, working well and doing what they want.

Yep, I have loads of stuff running atm and most native looking thing on my Windows desktop are Notepad++ and FreeCommander. VScode - no, Intellij IDEA - no, any of the chat apps - no, Firefox - no, Lightroom - no. Does it bother me - also no.

Native look has lost its meaning long time ago.

Re: The decline and fall of Java on the desktop

#248
post #241
post #228

Earlier quoted context omitted.

Look at ZGC GC. It has less latency due to stop-the-words than what the OS scheduler causes. (Of course at the price of throughput). But also the default GC, while on default being more throughput preferring can be tuned by a single paramater.

> 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 struggle with a workload then it is pretty much guaranteed that other GCs have already broken down completely at the fraction of that.

Regarding your application, did you check how many objects have you allocated? VisualVM and the like can show you precisely the statistics of your allocations.

Re: The decline and fall of Java on the desktop

#249
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.

Re: The decline and fall of Java on the desktop

#250

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.

Post reply on HN