Live data from Hacker News

The decline and fall of Java on the desktop

jdeploy.substack.com

131–140 of 362 posts

Re: The decline and fall of Java on the desktop

#131
The article ends right where my knowledge drops off, so I'm waiting for part two.

The piece did remind me of the poor Java performance at the turn of the century. If you thought it was bad on a Sun or Wintel, you would have really enjoyed the SGI Irix port I tried to make use of at the time. It was even more unoptimized than the common platforms. :D

I remember typing into a Swing? text field and the keystrokes not registering for a second or three, basically unusable. Made me stick with AWT for a chat client/server I'd created for learning purposes, which was not quite so bad. Shortly after that I found Python, which was a breath of fresh air at the time and didn't write another line of Java for about 15 years, never again for Perl.

Re: The decline and fall of Java on the desktop

#132
post #93

Earlier quoted context omitted.

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.

Haven't used Lombox, RxJava is great, but it just feel like bandaids on a language that wasn't really designed for it. There's no accounting for taste, but I'll take either Scala or Clojure on the JVM any day of the week. Scala's monads don't feel like a library feature, they feel baked into the language...because they are.

Lombok is indeed a band-aid that replaces IDE-autogenerated code, which in turn is a band-aid for language design choices on the one hand (e.g. equals and hashcode), and accepted Best Practices in Java world like setters/getters everywhere; for the latter, you can either do public final fields, just use public fields until you need an accessor method (java's refactorings are great), or on the other hand add language features like in C# and Scala where from a class consumer point of view, accessing a value or calling a setter/getter are the same.

That said, I did hear Java is getting value types soon, or something like that. A bit too little too late maybe, but welcome nevertheless.

If I had the choice I wouldn't use Java again; JVM is fine, but there's better languages for it than plain Java. Kotlin seems alright. Wouldn't use Scala again, that's a language for sadists.

Re: The decline and fall of Java on the desktop

#133
Java is a great language. But it failed to become the universal "write-once" VM that everyone dreamed of in the 90's. Instead, the web browser did that. So there's really no reason to bother with native Java development anymore when browsers can do everything.

Re: The decline and fall of Java on the desktop

#134
post #111

In 2020: Admin: Wow, just look at our new 4 CPU server with 1TB super-fast DDR4 RAM! Its capacity is almost infini- Java: Pf-f-f-f! (9_9) Jokes aside, the only thing I remember about java on desktop is constantly downloading and installing frmeworks. And lags, lots of lags. Terrible lags. And flickering windows.

Java's so efficient, it makes my laptop battery meter run backwards!

Sadly, it only does that when the machine is trying to charge.

Re: The decline and fall of Java on the desktop

#135
post #7
post #4

Java Swing still lets you make native-looking-and-feeling apps (with some care). I don't know of any new GUI frameworks that let you do the same. I consider this a killer-feature of the framework. It's also very fast, backed by OpenGL and DirectX. It also ships with source code and isn't declarative, so it's trivial to step into as a means to debug why your code isn't working.

I will freely admit that Java Swing remains the only GUI toolkit I've used that I actually felt comfortable using to write a GUI, rather than something that feels like having to pull out teeth to get things working in a somewhat coherent manner.

Absolutely agree, provided you use a layout manager that isn't brain damaged.

Anyone remember this video? https://www.youtube.com/watch?v=UuLaxbFKAcc - Totally Gridbag

Re: The decline and fall of Java on the desktop

#136
post #33

IMO the real decline was Oracle. Java used to be a slowly rising language and set of platforms with benevolent oversight from SUN and at least the outlook that it was one of a few things you might want to add after Microsoft's Windows or Apple's OS (Macintosh or later OSX). Then Oracle bought SUN and everyone knew all of the good would eventually be strangled out by the lawyers and models that sought to dominate and…

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…

The hassle involved with needing multiple versions of Java on one system also impacts its viability on the desktop. Not a problem if you run your Java-based services in containers that can use their own JRE, but a huge annoyance for kids and budding hobbyists who try to run Spigot and god knows what else on the same computer.

Re: The decline and fall of Java on the desktop

#137

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…

Have you by chance had any experience with using Kotlin with JavaFX/OpenJFX? I've never been much of a fan of Java, but have had a fair amount of exposure to Kotlin via Android development and have found it fairly pleasant to work with, so if it meshes well with OpenJFX that may appeal to me as an option for cross-platform desktop dev.

Re: The decline and fall of Java on the desktop

#138
post #93

Earlier quoted context omitted.

Haven't used Lombox, RxJava is great, but it just feel like bandaids on a language that wasn't really designed for it. There's no accounting for taste, but I'll take either Scala or Clojure on the JVM any day of the week. Scala's monads don't feel like a library feature, they feel baked into the language...because they are.

Lombok is indeed a band-aid that replaces IDE-autogenerated code, which in turn is a band-aid for language design choices on the one hand (e.g. equals and hashcode), and accepted Best Practices in Java world like setters/getters everywhere; for the latter, you can either do public final fields, just use public fields until you need an accessor method (java's refactorings are great), or on the other hand add language…

Scala definitely has its irritations but I’ve grown to accept it. It has enough cool features to justify its existence.

I’ve not used kotlin but people I respect say it’s great, maybe that’s better than Scala.

Re: The decline and fall of Java on the desktop

#139

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 get it, they have tens if not hundreds of millions of LOC and thousands of developers working with it, they had to be conservative, but it didn't do the language much good, and after a few years, IMO C# raced past Java in terms of 'fun to work with'.

The downside is that until .NET Core, C# was a closed shop; by Microsoft, for Windows, and everything needs to be licensed. Whereas Java embraced more of the open source and freedom of choice mentality.

Re: The decline and fall of Java on the desktop

#140
post #99

Many things you don't know are Java are and they are VERY widely used. Java simply wont go away because it works. For serverside it's a nobrainer, but also for client if you have a niche consumer base. Average joes don't understand the overhead of writing native applications and they are paying for it without knowing. Here is my only contribution to the "desktop" Java eco system: http://move.rupy.se/file/logic.html I…

Java is an amazing platform and language. If not Java itself then Kotlin and the JVM. I think it’s underrated and I wish people would bring back web and mobile support so it can be truly cross-platform.

Web support... I think there may be WASM compilers for Java, but there's still going to be a lot of overhead.

Mobile, there's Android... or did you not realize that's Java?

Post reply on HN