4 ms·
I haven’t tried it, but isn’t JavaFX supposed to be the future of JVM based GUI’s? I’m actually very curious about others experiences with it.
by todd8 9y ago
I haven’t tried it, but isn’t JavaFX supposed to be the future of JVM based GUI’s? I’m actually very curious about others experiences with it.
- sesteel 9y agoI just went through a simple exercise; for my tests, a minimal JavaFX app starts at ~100MB while a minimal Electron app starts around ~65MB.
- olzd 9y agoSo? If you want a lightweight app, both JavaFX and Electron are bad.
- Aaronmacaron 9y agoThis is only the case if you bundle the JVM with your application. Without the JVM you can write a simple application without exceeding the .jar file size of 1 MB.
- sesteel 9y agoI should have been more explicit; this is the default in memory footprint of a simple hello world app. I didn't really try to reduce the heap or stack of the JVM, I'm sure that would help.
- Aaronmacaron 9y agoOh I think this is a misunderstanding. I thought you were talking about the binary file size which is very big for electron apps since they ship a full-blown browser. It is possible that JavaFX apps also use a lot of memory (RAM) but I was referring to the file size of the .jar file of a JavaFX app.
- whyever 9y agoIf you just count the JS and HTML, then a minimal Electron app is (hopefully) also tiny.
- Semaphor 9y agoThat's not the same though. You have to bundle electron to run your app. Your Java app is fine as long as Java is installed.
- whyever 9y agoYes, but theoretically Electron apps could use the browser. (I think Google killed that option though.)
- PinkMilkshake 9y agoYeah, it would be nice if the API's were standardized and then every browser had an "App Mode".
- perrylaj 9y agoNot sure how you built your minimal example, but current versions of Java will allow you to produce much smaller native bundles using jlink. Steve Perkins did a nice little writeup with an example repo at https://github.com/steve-perkins/jlink-demo https://github.com/steve-perkins/jlink-demo.