3 ms·
> 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
by rightos 9y ago
> 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.
- hellofunk 9y agoNot 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.
- brabel 9y agoThat comment was about RAM, not disk.
- nalllar 9y agoJava 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-application-packaging.htm https://docs.oracle.com/javase/9/deploy/self-contained-appli... jlink: https://docs.oracle.com/javase/9/tools/jlink.htm https://docs.oracle.com/javase/9/tools/jlink.htm
- poxu 9y agoI 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.
- billyjobob 9y agoThe 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.