Live data from Hacker News

Say no to Electron: use JavaFX to write a fast, responsive desktop app

sites.google.com

141–143 of 143 posts

Re: Say no to Electron: use JavaFX to write a fast, responsive desktop app

#141
post #36

I wrote an IDE using JavaFX: https://sekao.net/nightcode/ My experiences have been mostly great. As the author mentioned, the JDK comes with a nifty tool called javapackager that will generate a dmg, exe, deb, and other formats with the JRE built in. If you really do want to embed web content, it includes a WebView widget which is a fully-functional browser capable of loading local or remote content, and it even lets…

what kind of memory and performance footprint does the webview imply? is it similar to using electron, to some extent?

Re: Say no to Electron: use JavaFX to write a fast, responsive desktop app

#142
post #45
post #2

> That's a world of difference from an Electron app, which typically needs 200MB just to open. This is sort of an unfair comparison - the JavaFX one is mainly smaller because it doesn't include the distribution of Java and all the libraries, which is if I recall correctly about 200 MB, while Electron commonly includes all libraries and the renderer. I will give you that the Java distribution can at least be shared by…

Java 9 adds jlink, which lets you create a runtime image containing only the java modules you're using. This means you can ship a considerably smaller built in JRE with your app, if you don't want to depend on a system JRE. javapackager (uses jlink): https://docs.oracle.com/javase/9/deploy/self-contained-appli... jlink: https://docs.oracle.com/javase/9/tools/jlink.htm

I was able to create standalone java9 modular application using jlink, but didn't succeed using javapackager. Which is a pity, because jlink creates a distribution, which you launch with a .bat file, instead of .exe.

Re: Say no to Electron: use JavaFX to write a fast, responsive desktop app

#143

"you can distribute it to any user on any OS and it will just work." I had to check the date on this article to see if it was from 2007 or something. Under no circumstances does java "just work", its an insane mess of java shipped with the os, being updated, and people not updating due to oracle trying to force feed crapware as part of their installers/updaters. I, for one, do not live in a world that resembles anyth…

… especially if there's a dependency on JavaFX which is not available by default with every “Java” out there (eg. OpenJDK on Ubuntu).

I reported a bug on Launchpad last week for the missing JavaFX support in the Ubuntu OpenJDK package.

For details, see "JavaFX support is in upstream OpenJDK 9 but missing in Ubuntu OpenJDK 9" (https://bugs.launchpad.net/ubuntu/+source/openjdk-9/+bug/172...).

Post reply on HN