by shannah78 on 3/2/22, 6:29 PM with 357 comments
by alex_suzuki on 3/2/22, 7:13 PM
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 discarded.
Still happy with the choice, although it feels a bit dated and IDE support (IntelliJ) is so so.
by mjevans on 3/2/22, 7:30 PM
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.
by geophile on 3/2/22, 7:51 PM
A univeral GUI (e.g. Swing) was wrong-headed. I don't actually know what happened after people moved away from Swing. But even in the time range TFA discusses, Intellij IDEA, an IDE written in Java, was a success. It has always been multi-platform, and never had worse than acceptable performance in my experience. It has grown into a large suite of products, and I think it is widely considered to be the best IDE, for pretty much any language you can name, by a wide margin.
Java has become the new COBOL -- the language for business applications, which means backend development. But the continuing success and improvement, and broadening of the JetBrains products pretty much demolishes the argument that Java has declined and fallen on the desktop. JetBrains is an existence proof that it is a very capable platform for anyone who chooses to use it there.
by lacker on 3/2/22, 8:06 PM
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 2004 and Google Maps launched in 2005. At that point, if you wanted to make a web-enabled experience with a high-quality user interface, it became more and more clear that you should build the client side in HTML + JavaScript and the server side in whatever you wanted, possibly Java.
by sebazzz on 3/2/22, 7:03 PM
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 etc. Felt really like a step back.
by cosmotic on 3/2/22, 6:47 PM
by joshmarinacci on 3/3/22, 5:37 AM
by thrashh on 3/2/22, 7:52 PM
Literally the only obstacle to any language being on the desktop is the lack of someone creating a reliable, well-supported, cross platform, and easily licensed distribution method for that language.
by leftbit on 3/2/22, 8:53 PM
Swing suffered from two central weaknesses: the tutorials provided by Oracle were... often insufficient. And you could pick up some bad habits by following them. And then there were the UI builders where anybody could draw up something mediocre.
Real strength were the lightweight components where you could about change everything in your Look&Feel. Hexagonal radiobuttons? No problem. Want the drop down button of that combobox a bit larger? There you go.
SWT... wouldn't really categorize that as an UI toolkit. SWT is mainly driven by eclipse, not developed independently. All controls commonly used by eclipse run reasonably well. Using anything else, especially cross platform is risky. 2D graphics is especially slow. So it's only a reasonable choice if you want to build something that looks and behaves like eclipse. There's some styling of components via CSS, but it's not complete...
by TeaVMFan on 3/3/22, 4:55 AM
Contrast with the web deployment model:
* Deploy with a free SSL certificate
* Click Once, Run Anywhere (CORA)
Luckily for Java fans, you can make great Java apps for the modern web. Tools like TeaVM (and its Flavour toolkit for SPAs) make it possible. Code in Java, bind to real HTML templates, compose your app out of reusable HTML components, style with CSS. All the benefits of the modern web, with a single strongly-typed language top-to-bottom.
* TeaVM: https://teavm.org
* Real 5-letter word app made with TeaVM/Flavour: https://frequal.com/wordii/
* Migration Guide from Swing to TeaVM: https://frequal.com/TeaVM/migration/MigratingFromSwingToTeaV...
* Java Magazine article on TeaVM: https://blogs.oracle.com/javamagazine/post/java-in-the-brows...
by lildata on 3/2/22, 10:42 PM
- An Electron (Desktop) app
- An React Native Mobile app (that needs to be delivered through both Google & Apple proprietary channels)
Whether you loved or hated Java the language, it is hard to deny we ended up in a terrible place:
- We lost all freedom on mobile
- We rely way too much on Blink & Webkit
- We traded Java for Javascript
- It's still relatively slow
- We haven't fixed the security problem on desktop
- Devs now have to manage a lot more technologies & moving parts
by shiado on 3/2/22, 7:29 PM
by bullen on 3/2/22, 8:44 PM
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
It has worked flawlessly on Windows, Linux and Macs for over 15 years.
by thangalin on 3/3/22, 2:51 AM
The JavaFX-based WebView (an HTML rendering component) is lauded, but has no direct API to control the scroll position and is itself a memory hog. Scrolling must be handled through JavaScript, and that indirection is as unwieldy as you can probably imagine. FlyingSaucer is a workable alternative to WebView, but comes with numerous technical issues that rear themselves when embedding a Swing widget inside a JavaFX application---as I discovered during development.
Were I to start from scratch, I would definitely seek out alternative cross-platform programming languages for desktop application development. The JavaFX event-based model is top-notch, but there are too many technical gremlins to make implementation a smooth ride. (Such as improper handling of Alt+Tab, which leaves focus on the menu bar when returning to the application[4].)
[1]: https://github.com/DaveJarvis/keenwrite
[2]: https://github.com/dgiagio/warp
by throw7 on 3/2/22, 8:10 PM
I run tuxguitar once in awhile and it still gets multiple monitors wrong which makes reading music sheets awful by default. (the "fix" is to hard code a resolution in a startup config file which is awful ux).
by phplovesong on 3/3/22, 7:56 AM
Luckily there seems to be a push for fully native.
by marcodiego on 3/2/22, 9:02 PM
The development of the described scenario strongly devalued java's most advertised advantage, which was portability.
by Tommabeeng on 3/2/22, 7:52 PM
by Naac on 3/2/22, 6:47 PM
This paragraph should really be right in the beginning of the post, instead of in the conclusion.
by grandinj on 3/2/22, 8:02 PM
Works great, easy to debug, tons of open-source components to plug in when we need, sufficiently performant, thoroughly battle tested.
And these are medium update rate apps, not games, but not static forms either.
by antihero on 3/2/22, 7:53 PM
by bouncycastle on 3/3/22, 3:27 AM
It's kind of ironic, because most of our apps are now running in an even slower language with "Java" in the name (JavaScript)
by commandlinefan on 3/2/22, 10:49 PM
by toolslive on 3/2/22, 8:02 PM
Apparently, he changed his mind around OSX 10.5 and just removed it.
by digisign on 3/2/22, 9:33 PM
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.
by sosodev on 3/2/22, 7:47 PM
by nvmletsdoit on 3/3/22, 9:39 AM
Ofc the language at the end doesn't really matters, but I am conviced ( mostly because I only embrace MY learning experience ) that using a language like C helps you get into the programming mindset better.
I mean, you don't need to understand what a smart pointer is, but once you seen that the object you have created in your own implementation of a vector got copied over and over, you will think twice every time you write a function with a return statement in every language for the rest of your life.
by gedy on 3/2/22, 7:13 PM
by UltraViolence on 3/2/22, 8:46 PM
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.
by jahlove on 3/2/22, 7:39 PM
by pavlov on 3/2/22, 9:17 PM
- Obviously non-native look and feel. For many years Java apps didn't even use the system font. At a time when everything was on Windows and its UI was actually reasonably coherent, Java apps stood out as out of place and clunky.
- Deployment. Each user needed to first install the Java runtime from Sun. This was a deliberate strategy by Sun to get the runtime in place on as many desktops as possible, but it failed colossally. It would have been better to just bundle the whole thing with each app, as Electron does today.
by jillesvangurp on 3/3/22, 5:29 AM
These days web is the new cross platform technology. It works everywhere. And mobile is where people focus for native apps. Windows is an afterthought at best. Mac even more. And Linux oddly is now a main source of open source applications that also work on windows and mac. But it's not a big market.
Unless you consider Android a linux distribution. In that case it's absolutely huge. And Java/Kotlin are the languages of choice on that platform. But they are compiled to native ahead of time so don't require a JVM.
Otherwise, Applet support for browsers died a long time ago so that blocked Java from being useful on the web. The JVM as distributed by Oracle (and other openjdk packagers) only really covers the traditional three desktop platforms. And it's not really native there and kind of heavy weight. That limits the appeal. Java is not really that cross platform anymore. Sun failed to anticipate and survive the move to smartphones. Up until then J2ME was a thing. These days almost no phone comes with Java support. That's the real reason Java usage on the desktop declined. It did not cover new platforms from about 2007 onwards.
Despite this there's a new JVM framework on the block: compose desktop. It uses skia (like flutter) and there's a mobile variant supported by Google called jetpack compose. And a web variant called compose web. IOS support is missing. But that looks like it might be addressed at some point.
by janaagaard on 3/2/22, 7:56 PM
Could it be the release of Gmail (2004) and Google Maps (2005) showing that you could actually make really great apps written in HTML and JavaScript? For me, these two webapps were turning points in how the web was looked at. As I remember it, things didn't really take off until frameworks like AngularJS were released around 2010.
by rowls66 on 3/2/22, 9:15 PM
On the desktop, Microsoft and C++ were already well established. In the browser, Sun did not offer a browser of their own, so Java depended on support from Netscape, Microsoft and eventually Google. Those companies all had their own technologies for browser development tools, and never tried very hard to support Java. Also Java was a little too much for many 90's era PC's connecting to the internet over dial-up connections, so it was slow.
by favorited on 3/2/22, 8:44 PM
The story I've heard from people who were in the room is slightly different. Jobs acknowledged that Java had its place on the server, but on the client-side: "Java is a big fat pig."
by cryptos on 3/3/22, 9:39 AM
As everyone is used to fat Electron apps now, Java applications (especially compiled and packed with new JDK features) might be refreshing.
by wly_cdgr on 3/3/22, 3:11 AM
by makach on 3/2/22, 7:46 PM
Java is not slow, I use a couple of high quality desktop applications and these will most likely have a future as long as the language is developed. These are not slow apps. Bad developers make bad software regardless of language.
One of the main things that I always struggled with was the IDE of java. Buggy, slow and overly complicated. I saddens me profoundly that java lost its "je ne sais quoi"
by nitwit005 on 3/2/22, 9:15 PM
by anthony88 on 3/2/22, 10:36 PM
The fact that it doesn't look exactly like the OS is not I think a big problem for users. Applications like Google Chrome, Discord and Electron apps don't look native and nobody complains about it.
by ldargin on 3/2/22, 10:25 PM
by pier25 on 3/3/22, 6:41 AM
by bastawhiz on 3/3/22, 4:32 AM
by jcranmer on 3/2/22, 6:54 PM
In the time I was playing around with applets (largely after the dates mentioned in this article, mind you), I don't think I came across any site using applets that didn't stick with <applet>. Using <object>/<embed> might have been more "correct," but this is also fervently an era where trying to enforce "correct" HTML usage was at best an attempt to whip the tide into submission.
by numlock86 on 3/3/22, 6:43 AM
What is this even referring too? Java is everywhere, especially on the desktop. I wouldn't completely contradict and claim "more than ever", but it sure is not on a decline and/or fall. Applets are gone for good, but that's about it.
by ajuc on 3/2/22, 11:10 PM
For various reasons we moved to Java SWT. It was so much worse it's not even funny.
Part of it was the absurdly overengineered architecture we used. We moved from 2-layer PL/SQL + C++ app to 3-layer PL/SQL + J2EE + SWT but on SWT there were like 5 additional layers and most of the code was XML configuration on the UI side. That's not Java fault.
But part of it was just SWT API being so much worse than Qt. Signals and slots make observers and listeners look like ancient technology. The graphical design tools were so much better in Qt. The layouts in SWT sucked. Everything was worse and took more work.
by rr808 on 3/2/22, 9:01 PM
by avereveard on 3/3/22, 8:05 AM
by democracy on 3/3/22, 1:43 AM
I remember writing a first SWT app (with embedded JRE) ~2004 and it looked nice and worked fast enough.
I think if Sun/Oracle didn't legally ban JRE trimming, added offical Swing browser widget and added a free cross-platform good-looking and developer/user-friendly installer - the story would've been different.
by IYasha on 3/2/22, 8:59 PM
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.
by mrfusion on 3/3/22, 1:15 AM
by ramesh31 on 3/2/22, 9:48 PM
by jlward4th on 3/2/22, 8:57 PM
by hn_throwaway_99 on 3/3/22, 2:27 AM
by eschaton on 3/3/22, 4:05 AM
by jasfi on 3/3/22, 7:19 AM
by loudtieblahblah on 3/2/22, 6:47 PM
And I despise supporting or troubleshooting Java applications.
Unfortunately that's my life these days.
From an admin perspective, python, php, hell.. Even ruby. All fine. But Java is a nightmare.
by wanderer_ on 3/2/22, 7:46 PM
However... Minecraft, anyone?
by jokethrowaway on 3/3/22, 1:47 PM
As someone who developed a few Java desktop apps and many more Qt + C++ ones, the difference in performance was huge (memory and startup time).
by ModernMech on 3/3/22, 1:02 AM
by nvmletsdoit on 3/3/22, 9:12 AM
Reletable
by kactus on 3/2/22, 7:44 PM
by tus666 on 3/2/22, 7:04 PM
by silver-arrow on 3/2/22, 9:19 PM
by throw_m239339 on 3/3/22, 3:06 AM