News for hackers. Stuff that matters.
Re:Say no to Electron: use JavaFX to write a fast, responsiv... by rightos on Tuesday October 03, 2017 @11:29AM (#15393040)
> 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 many applications, but you can definitely get into some nasty versioning situations with that.

On the other hand, if you were to compare this with say a Qt application, it'd be about ~20MB all in, ~10MB if UPX'd, no external dependencies needed. Or just the size of your tiny executable if you're working on a Linux distro that ships those deps already.

Re:Say no to Electron: use JavaFX to write a fast, responsiv... by nalllar on Tuesday October 03, 2017 @12:00PM (#15393348)
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

Re:Say no to Electron: use JavaFX to write a fast, responsiv... by poxu on Monday October 09, 2017 @07:34AM (#15432981)
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, responsiv... by billyjobob on Tuesday October 03, 2017 @12:00PM (#15393350)
The install size on disk is indeed about 200 mb including the Java runtime. However the claim here is that Electron uses 200mb of RAM, which is much more precious than disk

Most of the Java runtime is not actually used by most apps so the new modular Java 9 should produce much smaller installs, but I haven't tried it yet.

Re:Say no to Electron: use JavaFX to write a fast, responsiv... by hellofunk on Tuesday October 03, 2017 @11:31AM (#15393056)
Not to mention that the JVM (via JRE I think?) needs to be packaged with your desktop Mac app if you want to deploy on the App Store.
Re:Say no to Electron: use JavaFX to write a fast, responsiv... by brabel on Tuesday October 03, 2017 @11:59AM (#15393320)
That comment was about RAM, not disk.