News for hackers. Stuff that matters.
Re:Say no to Electron: use JavaFX to write a fast, responsiv... by ljoshua on Tuesday October 03, 2017 @11:59AM (#15393331)
Once the runtime is bundled in, what does the size of the standalone application come in at? Curious if it is close that of a bare Electron app (around 50-90 MB, depending on the platform).
Re:Say no to Electron: use JavaFX to write a fast, responsiv... by gw on Tuesday October 03, 2017 @12:06PM (#15393395)
In my project, the jar file itself is 20MB, and the resulting files generated by javapackager are: 55MB (.exe), 90MB (.dmg), and 67MB (.deb), all of which include the jar file inside them. These are not the total file size after installation, though.
Re:Say no to Electron: use JavaFX to write a fast, responsiv... by mjparme on Wednesday October 04, 2017 @11:36AM (#15401218)
Was this using the "javapackager" tool? This seems to have been introduced in Java 1.7 as far as I can tell.
Re:Say no to Electron: use JavaFX to write a fast, responsiv... by gw on Wednesday October 04, 2017 @01:41PM (#15402360)
Yes, I mentioned javapackager in the comment.
Re:Say no to Electron: use JavaFX to write a fast, responsiv... by mjparme on Wednesday October 04, 2017 @03:16PM (#15403552)
Hmm, indeed it does, but I could have swore that the first time I read the comment it didn't. I guess I forgot how to read earlier :-)
Re:Say no to Electron: use JavaFX to write a fast, responsiv... by mike_hearn on Tuesday October 03, 2017 @12:11PM (#15393462)
Yes in Java 8 it's comparable. In 9 it should be smaller due to some dead code elimination on module boundaries, but 9 just came out so it's a bit early for people to have experience with it yet.

Note that even in 8 you can do a DCE pass over the code and erase files you know you won't need from the JRE image by hand. I did this and shrank the size of the download by about half. The JavaScript world calls this "tree shaking", you can use ProGuard to do it in Java but it's a bit fiddly to set up.

Re:Say no to Electron: use JavaFX to write a fast, responsiv... by billyjobob on Tuesday October 03, 2017 @12:04PM (#15393381)
For Java 8 it is about 200mb. Java 9 should be smaller because it should only bundle the parts the app actually used.
Re:Say no to Electron: use JavaFX to write a fast, responsiv... by AlphaSite on Tuesday October 03, 2017 @12:15PM (#15393503)
Isn’t that the JDK, the jre is smaller from what I remember.