6 ms·
"you can distribute it to any user on any OS and it will just work." I had to check the date on this article to see if it was from 2007 or something. Under no
by mixologic 9y ago
"you can distribute it to any user on any OS and it will just work."
I had to check the date on this article to see if it was from 2007 or something. Under no circumstances does java "just work", its an insane mess of java shipped with the os, being updated, and people not updating due to oracle trying to force feed crapware as part of their installers/updaters. I, for one, do not live in a world that resembles anything like java jars "just working".
- pc86 9y agoYeah, try getting any Java program to work on a Chrome box.
- JohnTHaller 9y agoCorrect me if I'm wrong, but I don't think the Java updaters on Windows do bundleware anymore. I know nearly all the free Windows antivirus updaters automatically install Chrome and set it as your default browser unless you pay close attention still.
- Arkanosis 9y ago… especially if there's a dependency on JavaFX which is not available by default with every “Java” out there (eg. OpenJDK on Ubuntu).
- sydd 9y agothis is why you package the whole JVM with it. This leads to a native executable without any dependencies (e.g. IntelliJ products)
- jgneff 9y agoI reported a bug on Launchpad last week for the missing JavaFX support in the Ubuntu OpenJDK package. For details, see "JavaFX support is in upstream OpenJDK 9 but missing in Ubuntu OpenJDK 9" (https://bugs.launchpad.net/ubuntu/+source/openjdk-9/+bug/1721852 https://bugs.launchpad.net/ubuntu/+source/openjdk-9/+bug/172...).
- dawnerd 9y agoYeah I haven’t even had java installed in years. Only have a single app that uses it but it’s tucked away in a docker container. It’s basically flash to be, no longer a need.
- wyattjoh 9y agoI have an old release of Photoshop, didn't even install it because it demanded such an old version of Java.
- billyjobob 9y agoJavafx 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.
- Hupriene 9y agoGenerally java desktop software is wrapped together with a bundled jre and behaves like an executable without external dependencies. There are a bunch of ways to do this. For example: https://github.com/libgdx/packr https://github.com/libgdx/packr
- mike_hearn 9y agoIt does just work, at least compared to web apps. I have experience of both web dev and distributing a somewhat complex JavaFX app to consumers. I bundled the JRE with my app so the users did not need to have Java installed. The leaks in the operating system abstraction Java gives you are really quite small. I wrote my entire app on macOS and tested on Linux/Windows only right at the end - after about 8 months of full time dev work I spent about a day addressing platform specific issues. That's pretty good. Now compare that to the mess that web browsers were and still are. It's better than it once was, but you're going to have to check every single feature of HTML5 you use to figure out which browsers implement it, which don't, which use vendor prefixes still, which only half implement it, which don't but can be shimmed using big blobs of JavaScript and so on. The web absolutely doesn't "just work": you will spend more far time working around browser specific issues than you will spend dealing with OS specific issues in Java.
- wieghant 9y ago> It's better than it once was, but you're going to have to check every single feature of HTML5 you use to figure out which browsers implement it There's tools for that and i'm pretty sure just writing plain html and css or some compile-to-js would have shaved off significant time from that 8 month full dev time.
- mike_hearn 9y agoIt wouldn't have been possible to do as a webapp at all, as the app in question was a peer to peer app that spoke a fairly complex network protocol that doesn't support WebSockets (Bitcoin). But even if that issue hadn't existed, the development time went mostly on logic and p2p/networking issues. HTML wouldn't have helped and JavaFX supports a dialect of CSS2 anyway.
- ballenf 9y ago> you're going to have to check every single feature of HTML5 you use ... you will spend more far time working around browser specific issues than you will spend dealing with OS specific issues in Java. I'm confused at this comparison in terms of Electron. Do you have to worry about any of that when doing an Electron app? Or were you making a comparison between JavaFX and web dev?