4 ms·
Javafx includes a packager tool which creates a native application with the runtime bundled inside. There is nothing to install.
by billyjobob 9y ago
Javafx includes a packager tool which creates a native application with the runtime bundled inside. There is nothing to install.
- ljoshua 9y agoOnce 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).
- billyjobob 9y agoFor Java 8 it is about 200mb. Java 9 should be smaller because it should only bundle the parts the app actually used.
- AlphaSite 9y agoIsn’t that the JDK, the jre is smaller from what I remember.
- gw 9y agoIn 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.
- mjparme 9y agoWas this using the "javapackager" tool? This seems to have been introduced in Java 1.7 as far as I can tell.
- mike_hearn 9y agoYes 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.
- maxxxxx 9y ago.NET could use that.
- revelation 9y ago.NET Core can do that: https://docs.microsoft.com/en-us/dotnet/core/deploying/deploy-with-cli https://docs.microsoft.com/en-us/dotnet/core/deploying/deplo...