Swingland: Recreating Java Swing for Wayland

This page summarizes the projects mentioned and recommended in the original post on dev.to

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

    Discontinued Java software radio based on FUNcube Dongle

  • Back in the past I wrote a couple of Java apps. These were written using the Java Swing framework, and have worked nicely on both Windows and Linux X11 desktops for a long time.

  • powermonitor

    Discontinued open source firmware using open source tools for HCS08 based mains power monitor card (by phlash)

  • Back in the past I wrote a couple of Java apps. These were written using the Java Swing framework, and have worked nicely on both Windows and Linux X11 desktops for a long time.

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

    WorkOS logo
  • caciocavallo

    headless Swing UI testing

  • It turns out Java GUI technology has been somewhat abandoned by Oracle, in particular when running Swing (or JavaFX) applications on Wayland, Java relies on the XWayland adpater to bodge X11 API calls back to Wayland proper. This is not great (read: doesn't work out of the box), so I wondered if someone had implemented a native Wayland backend for Swing - and they have, multiple times - super, but wait.. Oracle have not merged either project into mainline Openjdk, and indeed the only way to make either of them work is by hideous bodging, which also puts paid to any thoughts of writing my own backend, as the hacks required to load it at run time (read: in every application) are not sustainable. Grrr! So what to do?

  • OpenSceneGraph

    OpenSceneGraph git repository (by phlash)

  • I can of course switch back to an X11 desktop (ie: Budgie), but this irritates me, plus I have already ported OpenSceneGraph + Flightgear to Wayland, it wasn't that difficult :)

  • swingland

    Discontinued Java Swing-on-Wayland implementation

  • As soon as I have enough of the protocol implemented to connect and display something, then testing ensues - gotta see something on screen :) The test program will now evolve along with the protocol components as I add features. Oh, and it works nicely - this is 11 days in!

  • wayland-explorer

    Easily browse and read Wayland protocols documentation

  • Given I will be using most of the Wayland protocol to achieve anything (it's minimal) and Wayland is well specified then the 'start at the bottom and build up' design pattern fits. Wayland has a wire protocol based on a Unix socket, and usefully Java has supported Unix sockets since release 16, so I can write everything in Java to (de)serialise messages. This gets me going quickly, providing positive feedback that I'm on the right track..

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