News for hackers. Stuff that matters.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by hankman86 on Thursday March 24, 2022 @09:59AM (#30789845)
The effort is laudable, but ultimately futile. The world has moved on from Java on the client. It is now largely relegated to a backend language for enterprise applications. Nobody really wants the heavyweight mess that is the JRE on the desktop when other frameworks do a better job. There was a case for Java-based desktop apps in the 1990s/2000s when browsers were slow, desktop UI toolkits were generally terrible and lacked cross-platform capabilities. But this was then and now is now.

So no, a new UI toolkit is not going to revive Java in the mainstream.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by matsemann on Thursday March 24, 2022 @10:13AM (#30790034)
All your points tell you haven't a clue of how modern java works. No need to mess with the JRE, just bundle whatever you need in your executable and it behaves just like any other application. And it's not heavyweight, at least not compared to Electron and friends, which are thriving. So I don't see why that should be a concern.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by icedchai on Thursday March 24, 2022 @11:14AM (#30791049)
Yep. At my previous company, the Java (server-side) builds were a lot faster than the JS / React (client-side) builds. The fat jars were also a breeze to deploy. Java is lightweight now.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by Cthulhu_ on Thursday March 24, 2022 @12:12PM (#30791889)
JS / React build performance suffers because of a few things; sheer amount of files and code due to the normalization of small files and many dependencies, and inefficient compilers / transpilers built in Node-flavored JS instead of native.

There's projects like deno and esbuild that should help mitigate those issues, and Yarn's Plug'n'Play to reduce file amount and size overhead by using .zip files and centralized repositories. I mean it's only a patch but still.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by icedchai on Thursday March 24, 2022 @12:55PM (#30792477)
Whenever I do a "du" on a node_modules directly, I am always amazed! How did we get here?
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by nobleach on Thursday March 24, 2022 @02:11PM (#30793484)
We said that we were adopting the Unix philosophy of doing one thing, and doing it well. While at the same time, we wanted to avoid the dependency hell that plagued other systems. So we allowed each dependency to specify its own version of dependencies. The graph grew to an unmanageable mess. I realize you may already know this, but perhaps someone reading these comments could benefit.

Every organization with whom I've been affiliated since 2017 has a fairly strict policy of dependency audit. Dependencies are NOT allowed to be added unless there's a really good reason. And even then, we pay a lot of attention to what that dependency will bring with it.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by towndrunk on Thursday March 24, 2022 @10:26AM (#30790233)
Can you point to an example? I would love to download one of these types of apps and give it a try.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by yashap on Thursday March 24, 2022 @10:39AM (#30790488)
IntelliJ IDEA is the first that springs to mind - very popular Java app that ships with a bundled JRE. Not sure I’d call it “lightweight”, it does take awhile to boot up, but once it boots it’s a great app.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by nicoburns on Thursday March 24, 2022 @10:45AM (#30790585)
> Not sure I’d call it “lightweight”

Indeed, I'd argue that apps like IntelliJ are exactly why nobody wants Java on the Desktop. I had to buy a computer with more RAM specifically because IntelliJ uses so much. Even Electron apps aren't so bad with regard to RAM usage.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by perrylaj on Thursday March 24, 2022 @11:18AM (#30791104)
This might be true, but it's also misleading. Intellij is a pretty huge application, with a gigantic set of features and capabilities, likely far more substantial than even the largest/most complex Electron app out there.

Intellij would require notable memory and cpu regardless of whether or not it was Java. See XCode and Visual Studio for comparison, as they are probably closer to the same feature profile than something like VSCode would be. Their memory footprint and performance is not what I'd call substantially better than Intellij (and as with most comparisons of this nature, many caveats exist around which plugins/addons/features are in use).

Would Intellij have a better resource profile if it were native? Ya, possibly, but it's also possible that another language/platform would have been a significant barrier to long-term success. Not many cross-platform UI toolkits from 2000 to choose from, and many fewer have continued to be well-maintained and usable today.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by nicoburns on Thursday March 24, 2022 @01:31PM (#30792953)
> See XCode and Visual Studio for comparison

I haven't used Visual Studio, but I think IntelliJ comes out pretty unfavourably in comparison to XCode. On my machine XCode would only slow it down when it was actively compiling (which I would expect from any compiler - it uses pretty much all of the resources of the system), whereas IntelliJ would slow it down just having it open in the background. I had to close down everything else when I wanted to use IntelliJ, or deal with a laggy system. The only other app that had a similar effect was Figma.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kaba0 on Friday March 25, 2022 @07:41AM (#30800895)
It sounds like your OS handles memory pressure quite badly.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by isbvhodnvemrwvn on Thursday March 24, 2022 @01:04PM (#30792592)
I've never had the other apps freeze for 10-30s when loading for the first time during the day because it decided to index the whole project. Or completely freeze because I have 2GB of XML files in a directory I didn't even touch.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by cosmotic on Thursday March 24, 2022 @07:10PM (#30796651)
VS is substantially worse than IDEA in this regard; the feature set is consistently years behind, and many actions that are instant in IDEA are long, modal/blocking operations in VS.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by cosmotic on Thursday March 24, 2022 @07:08PM (#30796631)
When was this? I've been using IDEA for years and I've been satisfied with memory usage. There's actually a problem with massively increasing the memory usage such that more and more garbage builds up making garbage collection take much longer and causing freezes, though newer GC does much better here.

Also keep in mind what IDEA is doing with that memory. It's storing indexes to all your code and libraries for near instant bidirectional navigation and search.

Also be weary of supposed high memory usage with Java. The JVM will allocate memory from the operating system for the application but then not actually use it. It's doing this so that in the event the memory is needed, it's already been allocated to the process. I've seen other apps increase the overall memory load and the JVM then relinquish it's pre-allocated-but-unused memory.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by deepsun on Thursday March 24, 2022 @01:26PM (#30792890)
Additional couple GBs of RAM is not expensive. Especially for something you use professionally to make money.

It's like a carpenter using a hatchet because a bench plane costs more money.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kaba0 on Friday March 25, 2022 @07:40AM (#30800880)
Come on, you are comparing a full-blown IDE that holds the whole indexed project in memory, provides constant analysis to a TODO MVC.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by mike_hearn on Thursday March 24, 2022 @01:13PM (#30792706)
Maybe if you have lots of plugins it takes a while to boot. For me, it gets past the splash screen in about 1-1.5 seconds, then it takes another 2-3 seconds to fully restore the project/re-open editor tabs etc. That's not bad for what it's doing and an app of that size. Slow startup times are certainly not a big issue anymore.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by yyyk on Thursday March 24, 2022 @10:59AM (#30790804)
The modern story is to use jlink instead of asking the user to download the JRE (which doesn't exist anymore).

https://docs.oracle.com/en/java/javase/11/tools/jlink.html

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by mixmastamyk on Thursday March 24, 2022 @10:45AM (#30790591)
DBeaver perhaps?
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by dangerboysteve on Thursday March 24, 2022 @02:28PM (#30793640)
The desktop trading app from Interactive Brokers is a pretty good Java desktop app which implements its own UI.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by ericd on Thursday March 24, 2022 @10:38AM (#30790466)
I think Slay the Spire is written in Java? At least there’s a mention of it on the launcher.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by islon on Thursday March 24, 2022 @10:17AM (#30790100)
Devs complaining that the JVM is too heavyweight for client applications when electron is dominating the desktop landscape.

Satire is dead...

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by johntdaly on Thursday March 24, 2022 @10:31AM (#30790325)
I never “got” electron. My work is building webapps and I don’t see why anyone would want to use HTML and JavaScript to develop a significant desktop app with modern UI.

I can only assume web technologies and electron got popular because all of the Desktop platforms where trying to jump to tablets and phones and whatever else they considered new and shiny so that while web tech was a terrible stack it was at least stable.

P.S.: I sort of hope for Griffon to make a come back. Griffon framework + Groovy + JavaFX looked nice to me.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by toyg on Thursday March 24, 2022 @10:44AM (#30790573)
> while web tech was a terrible stack it was at least stable.

No no no. Web tech was/is terrible, but it's dirt cheap. You can hire JS hacks by the boatload, and retrofit whatever they build into an electron app relatively easily. Whereas desktop developers are few and expensive, and they tend to optimise for this or that platform or toolkit.

Electron didn't win on quality or features - it won on the back of commercial realities of the development world.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by KptMarchewa on Thursday March 24, 2022 @10:47AM (#30790628)
I don't think 'desktop' devs are any more expensive or cheaper. There's definitely way less of them and majority of people who know stuff like Win32 APIs are either very specialized or working on games.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by toyg on Thursday March 24, 2022 @09:12PM (#30797650)
Basic supply and demand dictates than, being fewer, they would command higher prices. Which they did, until JS ate the world.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by numpad0 on Thursday March 24, 2022 @11:40AM (#30791428)
Can’t set up a sweatshop as a school and have students pay to work on Win32 apps.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by KptMarchewa on Friday March 25, 2022 @06:44AM (#30800524)
That's what a lot of companies did 10-15 years ago in Poland. Sometimes it was Delphi. Of course, the applications were shitty, but also a lot of web is shitty.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by quatrevingts on Thursday March 24, 2022 @12:12PM (#30791890)
As a layout and rendering toolkit, the modern web browser is just head and shoulders above everything else in terms of features and ease of use.

As problematic as CSS is, getting things in the right place is still dramatically easier than with Swing LayoutManagers, and when you do have problems, you have great tools in the browser to explain what's going on.

Browsers particularly shine in text rendering, naturally; text styling, font selection, word wrapping, etc. are all easily configurable. You want bold text next to regular text in Swing? You either need two JLabels, or you wrap your text in <html> tags and let the embedded HTML 3.2 renderer do it.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kaba0 on Friday March 25, 2022 @07:45AM (#30800922)
Whaaat, no way. Sure, Swing is not the epitome of a framework, but the web was famously terrible before flexbox, and it is still not as advanced as something like Apple’s constraints based layouting system.

Also, word wrapping? HTML is quite terrible to read compared to Latex-rendered text so I wouldn’t say that it is all that good in fonts either.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by mike_hearn on Thursday March 24, 2022 @12:33PM (#30792181)
Swing isn't exactly the latest toolkit though, is it?

JavaFX has much more intuitive layout for apps than HTML and also has CSS. So you can get the best of all worlds. HTML5 has been trying to catch up with CSS flex-box, but it's all just retrofitted and shows.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kizer on Thursday March 24, 2022 @10:52AM (#30790696)
Well, there are a number of “selling points” to electron/NW.JS or similar: reuse JS code/skills/libraries (npm) to build desktop apps; use Node.JS to build desktop apps; cross-platform. It clearly lowered the barrier and from a company’s perspective front-end talent’s “reach” is expanded.

Even way before they came out I wondered why more native apps didn’t just reuse HTML/CSS at least (many did).

Of course we all know of the downsides of Electron (basically Chromium + An App in every app; ridiculously heavy-weight.

I’m fond of the webview project and Tauri, being built on top of it. It reuses the available system browser view and doesn’t bundle Node, so it’s very light.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by Octoth0rpe on Thursday March 24, 2022 @03:17PM (#30794201)
> It reuses the available system browser view and doesn’t bundle Node, so it’s very light.

It's 'light' in terms of download size, it's not far off from Electron in terms of resource usage. Most complaints about Electron are about resource usage, not really download size (though there are some).

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kizer on Thursday March 24, 2022 @08:14PM (#30797256)
Very good point.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by floucky on Thursday March 24, 2022 @10:28AM (#30790288)
Javascript is going to the desktop with Electron, C# is going to the browser with Razor, what a time to be alive.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by EMM_386 on Thursday March 24, 2022 @11:54AM (#30791636)
> C# is going to the browser with Razor

"Blazor", actually.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by nobleach on Thursday March 24, 2022 @02:16PM (#30793511)
Yes. Blade + Razor.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by beamatronic on Thursday March 24, 2022 @10:34AM (#30790372)
I think what we need is a very thin layer, or perhaps just a binding, between JavaScript, and native UI API calls. Then you could have a JavaScript non-web app with native look and feel
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by inamiyar on Thursday March 24, 2022 @10:43AM (#30790552)
I'm not sure if I'm reading this right but either duktape or WebView might do what you want.

https://duktape.org/ https://github.com/webview/webview

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by beamatronic on Thursday March 24, 2022 @02:55PM (#30793961)
I'm thinking of a world with Javascript, but without HTML or a web server.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by cxr on Thursday March 24, 2022 @05:13PM (#30795405)
You're describing the Mozilla platform's old XUL strategy, or the modern Gnome desktop. JS has permeated GTK for the last 10 years. It was a huge part of Gnome 3. For a brief moment, pushing people to start with JS for their next GTK app was an explicit strategy for the Gnome project. There was so much backlash, though, that they backed away from that position a month or two later. Had they had the courage to stand their ground, the rise of Electron might never have happened. A world with a better GTK as the go-to cross-platform UI toolkit would have been a lot better than where we ended up instead.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kaba0 on Friday March 25, 2022 @07:46AM (#30800932)
Or Qt’s QML.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by cxr on Friday March 25, 2022 @07:59AM (#30801047)
You can make a hello-world app with JS and GTK by creating a file hello.js, typing some code in, and then running it. AFAIK, although Qt has some support for JS integration, the story is not the same. You still need to develop a traditional Qt app and then start peppering in JS where it suits you. Am I wrong?
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by rhengles on Saturday March 26, 2022 @10:24AM (#30812051)
I did a little proof-of-concept a long time ago using Mozilla Rhino + SWT apis and managed to get a small window on the screen with a few buttons with only javascript, but I couldn't figure out the api to make a simple http call...
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by blablabla123 on Thursday March 24, 2022 @10:23AM (#30790184)
That's true on the other hand the state of Java desktop UI frameworks is at best confusing. I guess it's possible to write well performing Java desktop apps and yet I have a Java app that slows down my whole system and usually crashes on macOS
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by johntdaly on Thursday March 24, 2022 @10:38AM (#30790460)
Is the App an old POS? I see a lot of old Java Apps still around that sort of bitrotted to hell. We bitched so much about Java Apps that so many just got abandoned, even if the apps where sort of cool and/or didn’t have a replacement.

Maybe I’m getting old but I’m a bit sad for all the open source apps that where abandoned over the years because the tech stack stopped being cool.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kaba0 on Friday March 25, 2022 @07:48AM (#30800947)
Anecdotal, but Java is the only platform where I could download a random jar from a possibly long dead professor’s abandoned website and have a working GUI of some CS algorithm visualization with a double-click.

Hell, websites don’t hold up as well to time with all the missing links/resources.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by thfuran on Thursday March 24, 2022 @10:09PM (#30797959)
It's much easier to write an application that crashes in C++ than in Java. I don't think the existence of whatever program you're talking about demonstrates much.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by mixmastamyk on Thursday March 24, 2022 @10:37AM (#30790437)
I use DBeaver on MacOS and it is pretty good and responsive. Only one intermittent keybinding bug with home/end.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by luciusdomitius on Thursday March 24, 2022 @10:05AM (#30789932)
I agree with the conclusion, but not with the argumentation, which would factologically correct sometime around 2012. For example these days you have modular JVM, GraalVM, etc and a hello world Micronaut service launches for about 20ms.

This doesn't affect the uselessness of client java as competition has also improved and java doesn't offer anything extra. If you want it quick & dirty you use electron, if you want to have it nice & smooth - QT. Desktop Java is neither a fish, nor a crab in a way.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kaba0 on Friday March 25, 2022 @07:49AM (#30800953)
How is Java desktop not nice & smooth?
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by matt_s on Thursday March 24, 2022 @12:20PM (#30792018)
I think you could just say the world has moved on from client-side desktop apps. Doesn't matter much what language, the majority of applications are web-based and there are major negatives to having a client side install experience with patching, versioning, support, etc.

Yes there are still niche domains that would need a desktop app but those are probably more rare as time goes on and/or already have established players.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by mike_hearn on Thursday March 24, 2022 @12:31PM (#30792165)
Client side install experience is what mobile apps have, and everyone seems to prefer them to web apps.

Web apps also have major downsides. It's easy to forget about them as developers, but for example, one is the lack of versioning. Someone pushes a new version of the app that's buggy/an UI downgrade/causes an outage and the users can't do anything about it.

Often you want an app to be local because it's interacting with local data, or local hardware, or it suffers from latency, or you don't want your data to go outside your jurisdiction, or it's doing something else where distance between you and the app is problematic.

Client side apps written using normal toolkits (not HTML) have a lot of major end user advantages, which is why:

• Mobile apps beat web apps, despite devs trying to make users accept them (recall the history of the Facebook app for example).

• HTML5 keeps sprouting features that desktop apps have had since the beginning. Filesystem access is a recent example.

Any time you want your data to be independent of the apps that work with it, web apps just faceplant.

In my view developers push web apps on users usually for our own convenience, e.g. being easier to bypass IT department bureaucracy. But there's a lot of ways to do better than web apps, and yes, the JVM is pretty good platform to do that on (JavaFX is a great toolkit for instance, and JetPack Compose is very interesting). What it needs is a great distribution and update solution.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by matt_s on Thursday March 24, 2022 @02:36PM (#30793736)
I was mostly referring to desktop app vs. web app since the OP was talking about desktop apps. Mobile apps are a different topic but they also share a set of the similar trade-offs of a desktop app with install/upgrade and support (i.e. multiple devices/versions).

Pushing buggy/UI problematic software is a process/people problem not really a technology problem. I would bet the feedback loop for getting fixes in on web apps can be much shorter than client desktop apps (or mobile). Once a fix/change is tested we can have it out in production on a web app for 100% of users in 20 minutes.

Stand-alone apps are a great niche where the native UI kit or other UI kits that work for the problem being solved are a great solution, there isn't a need for web tooling.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by mike_hearn on Friday March 25, 2022 @05:35AM (#30800130)
On the web, regressions are a pure technology problem exactly because there aren't any chances for processes or people to get involved (other than the devs themselves). When users have more control over software rollouts they can tailor their risk profiles and tolerances to their own situations, do regression testing on their own scenarios etc. In turn that means you can offer better privacy.

An extreme example of where this matters is in the military. You cannot have an army in battle being brought to a halt because some web dev pushed a syntax error in a PHP file. You must have a qualification procedure that tests it in the scenarios that matter, which the developers may not even understand all that well.

Another example is medical software. If you push an app update to equipment in an operating theatre and a button stops rendering because the doctor had the font size wound up higher than expected, then people might die. You just cannot do that. Heck you cannot even allow it to depend on working internet. It has to be a desktop app (well, embedded, but a lot of embedded apps are just desktop apps on kiosk mode operating systems).

Now you're right that if you do push a bug, then due to all the data collection and the way browsers commingle data and code, you can fix things faster than the slower more async process preferred in the desktop world. But there's no fundamental reason it has to be that way, it's just a question of social norms. You can make a desktop app that can be force updated immediately or even on a per-screen basis. People just don't do it because often if you're writing a desktop app in the first place, it's because your users want or need more control than a web app would give them.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by lumost on Thursday March 24, 2022 @10:05AM (#30789931)
Aren't android UIs predominantly Java?
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by DaiPlusPlus on Thursday March 24, 2022 @10:15AM (#30790072)
Android's "native" UI library has hard dependencies on key components of the Android OS that go far beyond what can be provided by any random Java JVM/JRE (i.e. you can't simply use Android's UI .jars almost anywhere like we can with AWT and Swing).

Saying "Android's UI is Java" is like saying "Apple's macOS Cocoa is x86" - technically true, but belies the sheer volume of transitive dependencies.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by mike_hearn on Thursday March 24, 2022 @12:34PM (#30792195)
That's true of classic Android UI, which isn't that great anyway.

The new JetPack Compose ui toolkit is cleanly abstracted from Android and works on the desktop as well.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by datavirtue on Thursday March 24, 2022 @10:16AM (#30790079)
Yeah, as are some of the most popular and modernized desktop apps. I'm always astounded by these posts.

Java has two modern UI frameworks. Swing and JFX. They blow Microsoft's offerings out of the water--while being proven cross-platform.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by DaiPlusPlus on Thursday March 24, 2022 @10:21AM (#30790157)
> Java has two modern UI frameworks. Swing and JFX. They blow Microsoft's offerings out of the water--while being proven cross-platform.

I hope you're being sarcastic there...

Swing is decidedly not "modern" at all: its active development period only lasted from 1998 ended by 2005, and saying that Swing is "cross platform" is really overselling it because it always looks out-of-place, if not downright hideous (default skin) on every platform;

While JavaFX is/was so unpopular that it was removed from Java SE and Oracle will stop supporting it by 2025.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kaba0 on Friday March 25, 2022 @07:54AM (#30800994)
Regarding the microsoft part, how can anything not look out-of-place, when their own settings appS have like 5 different GUI design here and there.

Otherwise, JavaFX was axed from the JDK because there is absolutely no reason to tie a frontend lib’s lifecycle to that of the JDK’s. Swing could not be axed due to the insane amount of dependencies on it, but JavaFX has it in a way, better as being developed separately.

And even though it is not huge in terms of marketshare, it is doing good with proprietary solutions, cross-platform compilation to web, desktops, and both android and ios being available.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by luciusdomitius on Thursday March 24, 2022 @10:24AM (#30790197)
Well, which ones. I use IntelliJ and SQL Developer. While the first one is one of the best tools in the toolbox, it still has problems with global menus, dpi and pretty much everything very platform specific. Using xfce probably doesn't help.

Truth is that the only advantage Desktop Java has over electron is that it is a bit faster and less leaky, but the advantage above Qt is only that you don't need to learn C++.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by rsynnott on Thursday March 24, 2022 @10:37AM (#30790447)
> Nobody really wants the heavyweight mess that is the JRE on the desktop

I mean, people seem to put up with electron these days, and the few modern JVM GUI apps feel generally better than electron stuff (for instance the all-pervasive UI latency that you get with things like vscode and slack is largely absent from IntelliJ).

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kizer on Thursday March 24, 2022 @10:57AM (#30790777)
That latency really is the killer. The web needs a fast UI layer separate from the DOM. I’m waiting for WebGPU to roll out and build a UI library on top of it, forgoing the DOM. But then this is just another “hack”. I wish the web had something a bit better.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by zozbot234 on Thursday March 24, 2022 @11:26AM (#30791225)
The DOM can be blazing fast. Just avoid pointless div soup, and use CSS that avoids complex text reflowing when not strictly necessary.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by topaz0 on Thursday March 24, 2022 @10:37AM (#30790452)
The world is very large. Possibly most of it has moved on from Java, but I am frequently surprised by how often I encounter it in scientific applications. For example, ImageJ and micro-manager are very important players in the microscopy world, both large UI-heavy java projects, and MATLAB's UI is java based.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by thfuran on Thursday March 24, 2022 @10:13PM (#30797992)
Isn't matlab's everything java-based?
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by topaz0 on Friday March 25, 2022 @09:03AM (#30801634)
I'm not sure... you can run it with a -nojvm flag, which turns off the ui but still gives you an interpreter, but I'm not sure if that means "no java at all" or something more specific.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by TeaVMFan on Thursday March 24, 2022 @10:43AM (#30790547)
SnapKit lets you code in Java but deploy as transpiled JS when using SnapTea. No JRE, just a native browser app. Try the demos, it is quite, well, snappy.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by Macha on Thursday March 24, 2022 @11:04AM (#30790893)
Even the one platform where Java is the native language of the UI toolkit (Android) is moving to ditch the Java language for Kotlin.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by AtlasBarfed on Thursday March 24, 2022 @11:13AM (#30791037)
Kotlin doesn't bundle a fundamentally new/better UI toolkit. It's just another JVM language.

Most complaints about UI toolkit in "Java" are really about the JDK, its startup time, and the fact that the UI toolkit in the AWT/Swing days never closed the gap with native apps.

Kotlin would just be using the core library UI (or android UI API), so it's no real advantage.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by kaba0 on Friday March 25, 2022 @07:57AM (#30801020)
Android’s Java is no real java, it is stuck in a strange limbo of Java 8 compatibility with some cherry-picking from fresher features, while actual Java is at 18 now with plenty of important improvements.

Kotlin compiles some of these newer features’ equivalents to java 8, that’s why it is used. But that is a failure of android, not of Java.

Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by la_fayette on Thursday March 24, 2022 @11:57AM (#30791688)
Yes true, but the android sdk is completely written in java and this most likely will stay like this. Even some new jetpack libraries are written in java... If a newer java version would be enabled for android development, is there really a compelling reason to use kotlin?
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by hwers on Thursday March 24, 2022 @10:10AM (#30789983)
This is such a US worldview. As someone from europe, I'm still scared I'll stumble into a job where needing to code Java sneaks up on me (and quitting with leave and finding a new job is a few months endeavor). I wish it wasn't used anymore but that's far from the actual truth.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by eddieroger on Thursday March 24, 2022 @10:14AM (#30790044)
American here. The way I read that argument was Java on the desktop for UIs, not "no Java anywhere." Java has been a core part of every company I've worked for since finishing school, it's just kept on the backend in the service of APIs and the like. But other than Android UIs, mentioned in a different reply, Java isn't the driver of desktop applications, and probably won't be in the presence of Electron apps and more movement to mobile anyway.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by KptMarchewa on Thursday March 24, 2022 @10:50AM (#30790668)
Code Java or code desktop Java? You can easily stumble on stuff like Spring every job, but I'd be very surprised if I started new job and it turned out I have to write JavaFX as part of it.
Re:Ask HN: Does Java need a modern Java UI toolkit for deskt... by nikanj on Thursday March 24, 2022 @10:38AM (#30790462)
Why do you wish it wasn't used anymore?