r/programming • • Oct 21 '17

Using Java 9 Modularization to Ship Zero-Dependency Native Apps

https://steveperkins.com/using-java-9-modularization-to-ship-zero-dependency-native-apps#.Wes5IMWbUWE.reddit
310 Upvotes

109 comments sorted by

View all comments

20

u/Sloshy42 Oct 21 '17

It would be really super nice to be able to develop a desktop app in Java, bundling my own JVM, and publish it knowing that it would work pretty much anywhere like that. I have to wonder, though, would having multiple instances of the JVM on a user's machine not use up a lot more memory? Wouldn't this just be another Electron-esque situation all over again (albeit more efficient in some circumstances)?

21

u/BadMoonRosin Oct 21 '17

Good question. I'm working on a follow-up article specifically about JavaFX as an alternative to Electron (and Qt or GTK for that matter).

In terms of disk size, I can already tell you that a modularized JavaFX app is a small fraction of an equivalent Electron app. Given how many resources the Slack client devours on my laptop, I'm pretty optimistic about how the memory profiling tests will go, too. I'm not sure what to expect in comparing startup times.

Regardless, having dabbled with a bit of Electron development, and it's weird Frankenstein model of bridging between the browser code and the Node.js code... I have no doubt that JavaFX offers better developer ergonomics and cleaner design.

1

u/zachrip Oct 21 '17

I wouldn't base electron perf on slack. It's notoriously heavy, that's their fault, not just electron's.