Live data from Hacker News

The decline and fall of Java on the desktop

jdeploy.substack.com

171–180 of 362 posts

Re: The decline and fall of Java on the desktop

#172
post #58

Earlier quoted context omitted.

The JRE security horrorshow might have started before the Oracle aquisition, and we wanted rid of java on the desktop for the same reason we wanted rid of flash. Apple used to advertise that only Windows suffered from viruses until their own unpatched JRE was exploited widely. Oracle contributed by making updates burdensome to download, and now unavailable without a support agreement, but what stopped java GUI apps f…

My understanding is that most of security defects in the JRE were related to the browser integration. The core Java sandbox was secure.

Most of the high profile security issues have been either sandbox escapes or serialization issues.

The sandbox escapes were made worse by having applets in the browser.

Now that applets are not a consideration any more the sandbox (SecurityManager) isn't used very much anymore and the Java devs are looking at deprecating and removing it, so most of the sandboxing features will go away.

Re: The decline and fall of Java on the desktop

#173
post #54
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…

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 computing will be that Computing Java until maybe the sophomore year of college. Have fun!"

Students come to me their sophomore year of college completely awestruck. "I had not idea! I thought programming was all Java!" they tell me. Imagine that. Close your eyes and picture a world where all of programming is Java programming. How quick did you open them and splash water on your face to wake rid yourself from that nightmare?

Java is singlehandedly responsible for snuffing the dream of so many young programmers. I've seen it in my own research, where kids in elemntary and middle school describe programming as fun, interesting, and challenging. That's because at this age they're using fun languages like Blockly, and they spend their time programming making and playing games.

Then they get to AP computer science and they are introduced to Java. Perceptions of programming fall through the floor, with more students calling it difficult, frustrating, and scary. It's tragic what Java is doing to young people.

Like, I understand we want students to have skills they will use in business, but we can't present programming to them as if all of programming is OOP enterprise development in Java. It's a crying shame.

Re: The decline and fall of Java on the desktop

#174
post #153

Earlier quoted context omitted.

The exception doesn’t prove the rule. It’s ridiculous that I have to modify Java VM arguments so IntelliJ can use more ram and actually index my projects. The IDE is great, but Java undoubtedly makes it worse.

That’s the fault of jetbrains, not java. They release it with way too old JRE with custom patches and quite shitty default arguments, while it works eons better with no argument at all on an up-to-date jdk, but even more so with the single setting of a low-latency GC, ZGC. The JVM is a beast, why do you think a good deal of all serious web applications run on top of it?

Minecraft on modern JVMs still requires setting memory usage based on how much free RAM you have (though not GC tuning to the same extent as before).

Re: The decline and fall of Java on the desktop

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

In Clojure you can use JavaFX through cljfx

https://github.com/cljfx/cljfx/

I haven't used React, but I think it's very similar. You have a state atom and then a datastructure that represents the GUI and associated callbacks that modify the atom. So it ends up feeling very functional. It doesn't use hiccup, but it's a similar structure. I've got to say it was fantastic. The least painful GUI programming I've ever done. The core architecture isn't opinionated so there is a little boilerplate/plumbing to setup but then it's very smooth sailing. It even has a very handy memoization structure that allows you to seamlessly have intermediary derived states that update automatically. I release an app using it and it was very performant, used some Java CV libs and drew diagrams to the canvas and it was all very snappy.

My only minor complaint was that the final bundle was like 150MB, which given the scope of the app seemed a bit gross - but it's manageable. And as usual, buy default, the JVM gobbles up and doesn't release memory back to the OS which is annoying. But i think it's surmountable and In theory you could trim that all further with GraalVM. Just out of the box it's not the best for little hello-world apps

Re: The decline and fall of Java on the desktop

#177
post #29

On the other hand Minecraft is the best-selling PC video game of all time and it was originally written in Java and the Java client is the definitive experience of the game.

Let's not exclude Runescape, when it was a java applet back in the early 2000's.

Re: The decline and fall of Java on the desktop

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

That's not the fault of the language, though I'd say maybe Kotlin is a considerably better choice nowadays. If by blockly you mean the visual interface, what you said is going to be true for any language. If by blockly you mean javascript, maybe, but honestly if it's an exercise to build foundations (and not just for personal gratification), javascript (or python) isn't much easier for kids than Java, because it has more footguns. And if there's any fault in the language chosen for AP computer science, the blame should go to the designer of the curriculum.

Re: The decline and fall of Java on the desktop

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

People always love to invent mythic narratives about a golden age that was betrayed by its lesser descendents. It can be the Greeks mythologizing their ancestors, Marxists bemoaning how Stalin betrayed Lenin's legacy, or Java/Solaris partisans hating on Oracle. The fact that the acquisition cast off a bunch of brilliant, distinguished, charismatic engineers who have every reason to further the mythmaking also plays i…

Oh my God that was epic. Ellison as lawnmower is spot on.

Re: The decline and fall of Java on the desktop

#180

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.

I love kotlin and have messed around with javafx + kotlin. It works well once you have set it up.
Post reply on HN