The Decline and Fall of Java on the Desktop Part 1 (1999-2005)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • cljfx

    Declarative, functional and extensible wrapper of JavaFX inspired by better parts of react and re-frame

    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 datastructure that represents the GUI and associated callbacks that modify the GUI. 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 to setup at first, but then it's very smooth sailing. 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. In theory you could trim that further with GraalVM

  • FlatLaf

    FlatLaf - Swing Look and Feel (with Darcula/IntelliJ themes support)

    Some of the new LookAndFeels for Swing are really slick. Take a look, for instance, at FlatLaf:

    https://github.com/JFormDesigner/FlatLaf

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • HumbleUI

    Clojure Desktop UI framework

    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.

  • KeenWrite

    Discontinued Free, open-source, cross-platform desktop Markdown text editor with live preview, string interpolation, and math.

    My desktop text editor[1] is written using JavaFX and leans on Warp Packer[2] to create installer-free, multi-platform executable binaries (without jlink). A user contributed a new dark theme[3], which blends nicely with the desktop.

    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.

    [1]: https://github.com/DaveJarvis/keenwrite

    [2]: https://github.com/dgiagio/warp

    [3]: https://i.ibb.co/QpqS0NS/screenshot.png

  • warp

    Create self-contained single binary applications (by dgiagio)

    My desktop text editor[1] is written using JavaFX and leans on Warp Packer[2] to create installer-free, multi-platform executable binaries (without jlink). A user contributed a new dark theme[3], which blends nicely with the desktop.

    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.

    [1]: https://github.com/DaveJarvis/keenwrite

    [2]: https://github.com/dgiagio/warp

    [3]: https://i.ibb.co/QpqS0NS/screenshot.png

  • teavm

    Compiles Java bytecode to JavaScript, WebAssembly and C

    Code signing killed Web Start for anything but big $$$ projects. And asking people to download an application and run it with full privileges is a huge barrier to entry.

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

  • Codename One

    Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • skija

    Java bindings for Skia

    Maybe the story is not finished yet. New approaches like JetBrain's Compose (https://www.jetbrains.com/de-de/lp/compose-mpp/) with a React inspired programming model might bring some new interest to the platform. Then there is a Java binding library for Skia (https://github.com/JetBrains/skija), and JavaFX is also alive and high quality.

    As everyone is used to fat Electron apps now, Java applications (especially compiled and packed with new JDK features) might be refreshing.

  • jdeploy

    Developer friendly desktop deployment tool

    You build your Clojure app as an uberjar, yes. Only gotcha here is to remember "-Dcljfx.skip-javafx-initialization=true" so the JFX thread doesn't get started during build, and I've had no problems using Clojure's direct linking either. You use jlink[1] to create a custom runtime JRE image (this isn't strictly necessary if you're deploying to machines with a JRE but it cuts down on moving parts and gives you more control). jpackage[2] then takes that runtime image and your uberjar and creates installers for Mac/Windows/Linux. Both are command line tools, and we just have GitHub Actions that cut new releases for each platform when we tag something with a new version.

    Worth also keeping an eye on jDeploy[2] which adds extra goodies like auto updates, at the cost of some npm shenanigans. Not something I've played with yet though.

    1: https://docs.oracle.com/en/java/javase/17/docs/specs/man/jli...

    2: https://docs.oracle.com/en/java/javase/17/docs/specs/man/jpa...

    3: https://www.jdeploy.com/

  • AudioBookConverter

    Improved AudioBookConverter based on freeipodsoftware release (mp3 to m4b converter)

    Not OP, but if you're looking for a quick look, I use AudioBookConverter [1] that uses OpenJFX to execute ffmpeg commands to build M4B files. It's very clunky, especially when you install updates and such. But it gets the job done.

    [1] https://github.com/yermak/AudioBookConverter

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts