Live data from Hacker News

The decline and fall of Java on the desktop

jdeploy.substack.com

31–40 of 362 posts

Re: The decline and fall of Java on the desktop

#31
post #5

Earlier quoted context omitted.

Can you explain why it's so hard? I've had a lot better luck running Java apps than Python.

Not the parent but: Java has a long tradition of reimplementing things in Java rather than relying on system libraries. Everything from OpenSSL to tzinfo to libpng has its own Java implementation, entirely separate from anything else on the system.

Web browsers do the same thing, they vendor everything they can to make the cross-platform experience better. Given that browsers are pretty much full-blown SDKs these days, and with everything being deployed as either a web app or an Electron app, I think it's fair to say that Chrome and Firefox are the new Java.

Re: The decline and fall of Java on the desktop

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

Interesting, I'm not aware of any Java app that truly feels or looks native. I guess that there is definitely some selection biais, but do you have any examples of native-like Java Swing apps?

It doesn't really matter. The users don't care and who the hell would want a native looking experience on windows anyway? I haven't tried my UI on a Mac recently but I doubt anyone would notice a difference. I have used Intellij IDEA on Mac recently and I appreciated the custom theme.

Re: The decline and fall of Java on the desktop

#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 extract for revenue control.

Re: The decline and fall of Java on the desktop

#34
post #11

Eh Java never made it to the desktop. Weird.

I don't know why you're downvoted: there is some truth to that. Java has never been a big player on the Desktop space. There's been a few successful Java desktop apps but not that many.

I kinda liked developing Java Swing app but I never saw Swing apps as something very common.

On the other hand Java and the JVM "not on the desktop" kinda made it everywhere.

Re: The decline and fall of Java on the desktop

#35

Earlier quoted context omitted.

> native-looking-and-feeling apps Who are you kidding? > (with some care) No. Even if you were to give it more care than required to rewrite the GUI natively in each major platform, you still wouldn't be close. Look, I get it, there are plenty of applications where a bit of clunk in the GUI is beneath other things on the priority list. That's fine. But the number of java devs who think clobbering together a few nativ…

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.

Re: The decline and fall of Java on the desktop

#36

Earlier quoted context omitted.

Interesting, I'm not aware of any Java app that truly feels or looks native. I guess that there is definitely some selection biais, but do you have any examples of native-like Java Swing apps?

It doesn't really matter. The users don't care and who the hell would want a native looking experience on windows anyway? I haven't tried my UI on a Mac recently but I doubt anyone would notice a difference. I have used Intellij IDEA on Mac recently and I appreciated the custom theme.

> who the hell would want a native looking experience on windows anyway?

I would. People who use accessibility tools that work best with native controls would as well.

Re: The decline and fall of Java on the desktop

#37
post #16
post #7

Earlier quoted context omitted.

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.

You haven't tried AppKit, WinForms, or WPF.

Winforms is dead, as in not cross platform and WPF...the same. WPF is declarative XML as is Xamarin Forms (both slightly different XML oddly). Not fun.

Re: The decline and fall of Java on the desktop

#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 GUI would substantially more popular. As it stands, when I tell people I'm using JavaFX, they either don't know what I'm talking about, or they'll say "isn't that just Swing? Yuck!"

Re: The decline and fall of Java on the desktop

#39
post #5

Earlier quoted context omitted.

Can you explain why it's so hard? I've had a lot better luck running Java apps than Python.

Not the parent but: Java has a long tradition of reimplementing things in Java rather than relying on system libraries. Everything from OpenSSL to tzinfo to libpng has its own Java implementation, entirely separate from anything else on the system.

[deleted]

Re: The decline and fall of Java on the desktop

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

Sure but for those who remember history C# was Microsoft's answer to the incredible success that Java was clearly becoming. Being years late to the party and basically creating a (back then) Windows-only copy of Java, it's quite normal that they managed to do a few things better. Regarding UI editors: back in the days IntelliJ was already amazing and allowed to hide all that boilerplate Java code. This boilerplate co…

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.
Post reply on HN