Re:Say no to Electron: use JavaFX to write a fast, responsiv...
by billyjobob on Tuesday October 03, 2017 @11:56AM
(#15393294)
Javafx includes a packager tool which creates a native application with the runtime bundled inside. There is nothing to install.
[ Parent
| on HN ]
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.
Re:Say no to Electron: use JavaFX to write a fast, responsiv...
by maxxxxx on Tuesday October 03, 2017 @12:02PM
(#15393357)
.NET could use that.
Re:Say no to Electron: use JavaFX to write a fast, responsiv...
by revelation on Tuesday October 03, 2017 @12:26PM
(#15393599)
.NET Core can do that:
https://docs.microsoft.com/en-us/dotnet/core/deploying/deplo...