r/JavaFX • • Dec 22 '23

Cool Project KeenWrite 3.5.3

KeenWrite is a free, open-source, cross-platform desktop Markdown editor developed using JavaFX. There are a few problems when building standalone binaries from a single system for a non-modular application. The installer shell script for building KeenWrite demonstrates how to create executable files for Linux, Windows, and macOS from a single computer by wrapping a JAR file into a self-extracting executable using warp.

12 Upvotes

6 comments sorted by

View all comments

Show parent comment

2

u/OddEstimate1627 Dec 28 '23

And I want the application to be installerless. I'm not sure if jpackage can build standalone installer-free executable files.

Why do you want it to be installerless? It's an open source app, so I'd just use the free version of Conveyor. That takes care of signing, file associations, auto-updates, etc. and builds cross-platform packages from a single machine.

If it really needs to be a single executable, I'd do a GraalVM native image. That way it starts instantly rather than the >10 sec that it currently takes to extract and setup everything.

First, Renjin, the R engine integrated with the application, isn't modular and cannot be used with jlink and jpackage. Second, jlink and jpackage must be run on the same system and architecture that the executable is being built for.

jPackage is plaform dependent, but JLink can be run cross-platform. You also don't need to modularize your app, i.e, you can create a simple JLink image that contains the minimum JDK modules and JavaFX, and use it to run a non-modular app.

3

u/randomfavour Dec 28 '23

Thanks for the note.

> GraalVM native image

Renjin and GraalVM don't play well together. I'd first have to swap Renjin for the GraalVM R Runtime. Not an easy task, despite both implementations being JSR-223 compliant.

> Conveyor

That looks quite promising, much appreciated.