Live data from Hacker News

The decline and fall of Java on the desktop

jdeploy.substack.com

81–90 of 362 posts

Re: The decline and fall of Java on the desktop

#81
post #10

As a C# developer I remember the first time I developed a GUI java application. In C# you have a code-behind file with your own code and event handlers, and a "designer file" with the generated code to set-up the GUI itself. Then I used Netbeans for a Java app, and the code file contained weird sections of artificially not editable code, and event handlers were so much more complex and cumbersome - with inner classes…

I started from the other side of that fence, and I remember feeling jealous of how smooth the GUI editor was in Visual Studio. Even in 2022, I still don't think I've seen any Java GUI builders that are as easy to use as Visual Studio circa 2001/2. SceneBuilder is nice though.

Re: The decline and fall of Java on the desktop

#82
post #62

Earlier quoted context omitted.

I don’t think this is Java itself. Many Java apps are not designed with admin UX in mind. Those that have good UX usually don’t land on admin’s plate anyway and are managed by devs or devops.

jconsole is not user developed Java app, it is built-in tool comes with JDK distribution. And problem was not with UI it was that UI wouldn't come up because of some obscure network setting, with no useful error displayed back to user to fix issue.

UX != UI != GUI

Re: The decline and fall of Java on the desktop

#83
post #35

Earlier quoted context omitted.

https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/...

Swing's platform look and feel does not get a convincing native experience, as you'll find out the first time you open a JFileChooser on Mac and see a clone of the windows XP file picker with widgets made to look like mac OS widgets circa Snow Leopard.

The FileDialog is the only AWT widget I still use regularly. It gives you the native file chooser. Unfortunately it isn't terribly flexible when it comes to, for example, only selecting directories. In those cases, I have been known to use JNI to use the truly native dialog.

Re: The decline and fall of Java on the desktop

#84
post #71

What happened in the years leading up to 2005, or perhaps in 2005 specifically that caused this blackout? Where did all of the Java desktop developers go? Before 2004, there was a much wider perception that web applications were fundamentally limited by their latency, and if you wanted a really rich, interactive user experience, like Winamp or Outlook, you had to make a desktop application. Then Gmail launched in 200…

That sounds about right to me. AJAX - or more broadly, what we call HTML5 could have been the gamechanger.

Re: The decline and fall of Java on the desktop

#85
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 user has java installed, you can't just double-click a jar file to run it. And the performance isn't anything to write home about either, if Eclipse is anything to go by.

Java remains a fine choice for use on the server, of course.

Re: The decline and fall of Java on the desktop

#86
post #38

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…

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.

Re: The decline and fall of Java on the desktop

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

Really it was the Chrome v8 engine paving the way for electron and Single Page Applications.

The rot set in way before Electron came along.

Re: The decline and fall of Java on the desktop

#88
post #56

IMO the real reason why Java never took off on the desktop is because making a cross platform Java app is pretty easy but distributing a cross Java platform app is super hard. There’s all these situations that you have to account for, there’s no de facto way of doing anything, and you’re basically on your own finding a solution that fits your app. On top of that, you have to distribute the JVM and licensing for that…

100% agree. The "distribution" step has always taken way more time than I expected. And, I almost always had to compromise on certain platforms just because it couldn't get the square peg in to the round hole.

The goal of jDeploy is to sand off as many of these rough edges as possible to make cross-platform distribution as easy as cross-platform development.

Re: The decline and fall of Java on the desktop

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

I think Java's problems on the desktop started before Oracle. There were issues like the loooooonnnnnggg delay to get the "consumer JRE" out, a few too many high-profile security issues, lack of up-to-date support for various media formats (despite the existence of "JMF", Java struggled a bit in the media world back then. And probably still does). There were also shortcomings with regards to accessing peripherals as I recall, although my memory is admittedly a bit fuzzy on some of that now.

That said, Oracle's legal machinations certainly didn't help matters once they took over.

Re: The decline and fall of Java on the desktop

#90

I've made a few desktop apps in https://github.com/cljfx/cljfx (e.g., https://www.chronos-desk.com/ ), and cljfx (JavaFX + Clojure) is amazing and makes for rapid development, not to mention fun. I'm keeping an eye on https://github.com/HumbleUI/HumbleUI , which promises to be a step up.

Neat. I hadn't heard of either of those before (though I'm not a Clojure developer). Thanks for sharing.
Post reply on HN