Java Desktop, Quo Vadis?

CodeFX Weekly #59 — 9th of March 2018

Nicolai Parlog
nipafx news
Published in
6 min readMar 13, 2018

--

Hi everyone,

earlier this week, Oracle released a Java Client Roadmap Update (PDF) and it contained a few details that, depending on what you think about Java on the desktop, you might consider something between overdue and shocking. In short: The future of JavaFX and maybe even Swing and AWT looks uncertain.

(You need to know about Oracle’s plans for its JDK and OpenJDK to get the most out of this weekly.)

I send this newsletter out every Friday. Yes, as an actual email. Subscribe!

Java Desktop, Quo Vadis?

First, I want to tell you about the facts and a little background before I make some speculations.

The facts

Let’s start with some quotes from the roadmap. First about Applets:

* Existing Applet support in Java SE 8 will continue through March 2019, after which it may be removed at any time.
* Oracle announced in January 2016 that Applets would be deprecated in Java SE 9, and removed from Java SE 11 (18.9).

(You’re drunk, Medium, still no lists in quotes?)

That means unless you and our customers pay Oracle for support, you will have to stop using Applets within a year. That’s not new, though. Less expected was to read the same about Web Start:

* Oracle will extend support for Web Start in Java SE 8 from March, 2019, through at least March 2025.
* Oracle will not include Java Web Start in Java SE 11 (18.9 LTS) and later.

Ok, so no more Web Start (unless we pay). Got it. Good riddance, was my initial reaction, but it is actually a problem for some folks. Not the end of the world, though.

Next up is JavaFX, which doesn’t end up on the chopping block (yet):

* Oracle will continue to support JavaFX new fixes for Java SE 8 until 2022.
* Having open sourced JavaFX and related tools, Oracle is working with interested third parties to make it easier to build and maintain JavaFX as a separately distributable open-source module.

The interesting thing here is what it doesn’t say: Oracle does not plan to include JavaFX in Java SE (FX is not standardized) and will not start including it in the OpenJDK builds it offers — in fact, in the ongoing effort to align Oracle JDK and OpenJDK, Oracle will most likly remove JavaFX from its JDK.

While in the past most users installed Oracle JDK and one could reasonably assume that JavaFX is available on their machines, the tables are now turned and few users will have access to it by default. That sucks if you’re working on a JavaFX application that doesn’t ship with its own JDK.

Finally, we come to Swing:

Oracle will continue developing Swing and AWT in Java SE 8 and Java SE 11 (18.9 LTS). This means they will be supported by Oracle through at least 2026.

Doesn’t sound too bad, but read carefully and you might spot the loophole. Or wait for my speculation further below.

The trajectory

Before I speculate on some of the details, I want to discuss the larger direction in which Oracle is taking Java. From the same roadmap:

However, over the past decade, vendors of the most popular desktop operating systems have emphatically pushed for applications on their platforms to be delivered bundled with integrated, sandboxed runtimes. Increasingly they require desktop applications to be distributed through their own private “app stores.”

The notion of an application being distributed separately from a standalone JRE is, therefore, quickly fading.

This is in line with an earlier blog post from last September (emphasis mine):

As client application development continues to shift from the old “plugin” world to modern deployment, the need for a standalone Java Runtime Environment (JRE) that is installed centrally, separately from Java applications has diminished. Using the ‘jlink’ tool introduced with JDK 9 will make it even easier for application developers to package and deploy dedicated runtimes rather than relying on a pre-installed system JRE. Oracle will begin transitioning from the standalone architecture later next year in what will be a multi-year effort.

To reiterate, Oracle is moving Java towards a future, where every application comes bundled with its own runtime. While this makes a ton of sense for applications that run in the cloud on other peoples’ computers and over which you have a lot of control, the same can not be said for traditional desktop applications that you ship to your customers.

And indeed, no desktop technology is mentioned in that blog post — in fact even the word “desktop” itself doesn’t occur. Here’s what Oracle describes as “modern” (as referenced in the quote above):

The cloud has changed how modern applications are being developed, deployed and consumed. On the client side, ready-to-run mobile-first native applications and HTML5/JS web interfaces are increasingly prevalent. On the cloud side, “applications” are transitioning to container-based, modular microservices and even functions.

Yep, apparently desktop applications aren’t modern and need not concern Oracle.

This sounds a little sour. Look, I’m not saying that “the cloud” (or more generally, the frontend/backend architecture) will not swallow a large amount of current applications. But I strongly doubt that it will gulp down every last one of them or come even close in the near future. As it stands, Java is a great solution if your customers’ requirements demand a fat desktop application with the occasional call to the web instead of the other way around and it looks like Oracle wants to change that.

And it’s not like I’m not getting why. I recently heard a back of the envelope guesstimate that Oracle might pay about 50 Million US$ per year for its Java development team. It makes sense to funnel that kind of money into projects that it thinks provide the most value to it. All I’m saying is that that may not be the best value for the community and we may have to step up if we want to save Java on the desktop.

Because listen to this…

The speculation

With Oracle’s plans for the long term in mind, let’s look again at what the roadmap says about the desktop technologies:

* Oracle will continue to support JavaFX new fixes for Java SE 8 until 2022.
* Having open sourced JavaFX and related tools, Oracle is working with interested third parties to make it easier to build and maintain JavaFX as a separately distributable open-source module.
* Oracle will continue developing Swing and AWT in Java SE 8 and Java SE 11 (18.9 LTS). This means they will be supported by Oracle through at least 2026.

Playing devil’s advocate, Oracle could do all of the following and still be true to its word:

  • kick JavaFX to the nearest open source foundation in the coming week
  • completely shut down its investment in JavaFX
  • remove Swing and AWT from Java SE 12 and its OpenJDK builds (after March 2019, only paying customers would have Swing)
  • replace the desktop team with two on-call bug fixers

I’m not saying they’re planning that (I wouldn’t know) — I’m just saying they could do that without having lied. In that light, much more interesting that what was included in the roadmap is what was omitted: Any guarantee that Oracle is investing a dime in Java on the desktop beyond this fiscal year.

Project of the week: ArnoldC

It’s back! No, not like that — think how Schwarzenegger would say it. “It is bakk!” Yes, that’s more like it.

Programming language based on the one-liners of Arnold Schwarzenegger.

“Hello, World” in ArnoldC:

IT'S SHOWTIME
TALK TO THE HAND "hello, world"
YOU HAVE BEEN TERMINATED

Run:

java -jar ArnoldC.jar hello.arnoldc

PS: Don’t forget to subscribe or recommend! :)

--

--

Nicolai Parlog
nipafx news

Nicolai is a #Java enthusiast with a passion for learning and sharing — in posts & books; in videos & streams; at conferences & in courses. https://nipafx.dev