Live data from Hacker News

The decline and fall of Java on the desktop

jdeploy.substack.com

261–270 of 362 posts

Re: The decline and fall of Java on the desktop

#261
post #256
post #248

Earlier quoted context omitted.

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.

While there is a possibility of a bug, I really doubt it. G1GC is just a beast and likely has just no problem with the allocation-rate your program uses while ZGC has quite a tradeoff for really low latency.

Re: The decline and fall of Java on the desktop

#262
post #204

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…

Well said! Java is the exact opposite of sane defaults: the programmer must explicitly choose defaults at every turn. Furthermore, it constantly feels like the arcane minutiae required in Java is Java-specific , in a way that other languages (C-based, functional) aren't. In Java, if I memorize an incantation, most of the information I've just learned is Java-specific. In C or C++, it's more computing specific. Other…

> In C or C++, it's more computing specific. Other languages will use different syntax, but I will be doing the same thing.

I think you’ve just internalised C-isms. The core Java language is as close to conventional OOP as it gets, and the model is not that different from most OOP languages. It certainly isn’t alien. We ended up conflating C and computing, but it is more an accident of history and because so many languages borrowed so heavily from it.

Re: The decline and fall of Java on the desktop

#263
post #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.

C++ ides do cache files and monitor for changes too but they are much more useable on low-end hardware than anything Java.

Re: The decline and fall of Java on the desktop

#264

Java's only claim to fame is that's the granddaddy of C#, a far superior language and IMHO one of the greatest computer languages ever created. In addition, Java was ahead of its time, with mid-1990's computing power not up to the job of letting it run smoothly on lower and mid-tier PC's. It also required, for that time, an egregious amount of RAM memory.

C# is a "standing on the shoulders of giants" kinda language IMO; they learned a lot from Java and evolved on it, mainly in terms of developer ergonomics and features that makes their life easier and less tedious. They had less of a design-by-committee team behind it as well, making development a LOT faster than Java, which feels like it's run by ancient, slow moving behemoth companies like Oracle and IBM. I mean I g…

Java was open-source, but not free. Oracle tries everything to squeeze every last penny out of a company if they use Java or MySQL, including threatening with litigation.

If Oracle can't make humongous profits from a product they simply drop it or run it into the ground.

Re: The decline and fall of Java on the desktop

#265

As a member of the Swing/JavaFX/Netbeans teams during the 2005-2010 period (I left the day before Oracle took over), I can tell you that this story is broadly correct, but with many missing subtleties. At the time we thought of Silverlight and Flash and Adobe Air as our mortal enemies. We were all wrong. After AJAX and HTML Canvas the web essentially killed desktop app development. All of those internal corporate app…

Yet it's 2022 and I literally don't use web-based desktop apps for my day-to-day work ? Likewise, the SteamDeck just released with a desktop UI built entirely in Qt? I feel we are living in alternate realities

Re: The decline and fall of Java on the desktop

#266
post #73
post #40

Earlier quoted context omitted.

I mean, C# only got created because Microsoft wasn't allowed to add native GUI features to Java. I feel like you might have missed all the critical history with J++ and the lawsuit from Sun.

Yea, it's kinda hard to say how things would have shaken out. I think Sun was reasonably wary about J++. Microsoft's way of operating at the time was "embrace, extend, extinguish." Microsoft brought out Internet Explore (embrace), added ActiveX (extend), and pretty much extinguished Netscape. All websites could run in IE, but not Netscape - and users are going to use the browser that works for all sites. Sun's lawsui…

> Today, we see a much friendlier Microsoft. It's wonderful

> It's not like Microsoft was trying to create MAUI back in 2000

Today, in 2022, Microsoft still tries to uses the MAUI name even though it is directly the name of a pre-existing unrelated GUI toolkit (https://mauikit.org/). Much friendlier my arse.

Re: The decline and fall of Java on the desktop

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

Sure, the problem is - Java apps did neither.

Looking good? The default Swing metal theme was truly awful. It was possible to switch to Windows-like theme, but it was even more awful - it had plenty of visual glitches and things misplaced by a few pixels it couldn't even use the native file selector window.

Working well? Startup times and performance was terrible compared to native apps, and memory usage is still abysmal. And you got occasional GC pauses even in well optimised apps. I still sometimes run into occasional lags in Idea, even though Jetbrains did a lot of great work to polish the user experience.

Doing what they want? That depends on the programmer, but, besides developer utilities like IDEs, I can't think of a Java app that didn't have a better looking and more polished native competition.

Re: The decline and fall of Java on the desktop

#268
post #54

Earlier quoted context omitted.

Basically, every growth figure of the language shows otherwise. Oracle is ain’t saints, but the amount of needless bashing it gets here is astonishing. Regardless of what its other branches are doing, Oracle managed to do one of the smoothest language takeovers where the (stellar) core team is virtually unchanged, the language became completely open sourced and it underwent tremendous changes which resulted in huge g…

> but the amount of needless bashing it gets here is astonishing I don't think it's needless. I'll bash Java as long as it's the language for AP computer science. Imagine a budding young programmer, bright eyed and bushy tailed, eager to get into computer science. They get to class and greet the teacher "Welcome class, let's learn about Java. There's a wide world of computers out there, but your perception of computi…

Tell that to Google.

Re: The decline and fall of Java on the desktop

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

Lombok is too much magic for me, record class and the annotation generators libraries are a bit less magic

Re: The decline and fall of Java on the desktop

#270

It's interesting to note that probably the best selling Java application for desktop is owned and maintained by Microsoft: Minecraft. It's a testament to the technology that they still after all these years have not managed to make a definitive non-Java version that replaces the Java edition outright.

They could make it in C#; in fact a survival-focused clone VintageStory does just that.
Post reply on HN