JavaFX Native Deployment

https://blogs.oracle.com/talkingjavadeployment/entry/native_packaging_for_javafx

To me, this issue has been the #1 reason blocking use of Java in games. End users want their downloaded apps to feel native and don’t want to deal with installing a system-level runtime. It’s been possible to include a custom JRE with apps, but that takes a lot of effort to get working correctly and it’s not an area game developers like to invest effort into.

Has anyone tried this out? Does this technology work well with OpenGL/jogl/lwjgl apps and not just JavaFX apps?

70Mb? Oof, that’s pretty huge just for a hello world app. Even with a bundled JRE that seems much bigger than it should be.

Edit: Just tried it - their sample app actually has a load of api examples within, so a portion of that space is going to be app data. Did feel very native here on OSX so full marks for user experience (probably the first time I’ve ever said that about anything coming from Sun/Oracle).

Would be interesting to see how big a hello world app clocks in at. And if it can be used without the fx api.

Edit the second: Poking into the OSX .app shows ~9Mb of application code and data, and a ~168Mb JRE (uncompressed). The JRE looks structured in the usual way with the usual 64Mb rt.jar, alongside 45Mb and 15Mb javafx files and what looks like a tiny ‘headless awt’ native lib.

Other than that the output looks like a pretty vanilla JavaAppLauncher wrapped osx app. Which is good as that probably means you can use the fx tools to generate one then open it up and rip out the fx bloat if you don’t need it.

Anyone want to poke around the windows and linux versions?

I have no idea how that would be true.
Instead of “java mygame” you call “folder-to-privateJVM/java mygame”
doing it with a batch file, which can be converted to exe, sh and osx app thing, literally takes 2 minutes.

Exactly what I was just about to reply. Including a custom JRE with your app is easy as pie.

Probably worth pointing out that the fx guys haven’t solved the biggest problem with making java osx bundles - it’s frikken hard to make them on anything other than osx. Their tool seems to only produce native bundles when run on the same host os, which means having to run the same build script three times for windows, mac, linux. :frowning:

Which means they’re not doing much more than delegating to the underlying native tools, so it’s not really adding much except saving you time from implementing it yourself.

I just stick to a zipped .app for OSX. Seems to be just as well understood as a .dmg.

Cas :slight_smile:

Why is this JavaFX-specific? Why can’t I create installers for any Java application this way? Just because JavaFX is being pushed as the way of the future doesn’t mean they couldn’t have written this framework to package plain ol’ Java apps as well.

They’re only starting with JavaFX. Combined with Jigsaw in java 8, that should shrink the download sizes. It looks like an experiment that they rushed into production, but I can hardly condemn that since the more typical alternative is that such efforts sink into obscurity instead.

It’s a good start; be nice if they can get it all in “pure Java” so I can actually do all my builds from Windows :stuck_out_tongue:

Cas :slight_smile:

Windows? Why on earth would a Java expert be using Windows? Especially if you’re doing command line builds, the command line on Linux is an order of magnitude better than Windows. Windows is designed for point and click work.

More fool you for thinking that, then!

I don’t use any of the other OSes because they are all shit. In different ways. I even find Vista 64, which I’ve been using for 3 years now, to be less unpleasant than any of the alternatives. I have some hopes for Linux one day but not while the great unwashed who develop it remain clueless.

Cas :slight_smile:

V…vv…v… VIIIISSSTAAAAAAA???

That’s right. It’s rather clunky and irritating but about 100x less clunky and irritating than OSX or any flavour of Linux I’ve ever seen. And I have huge lock-in from all the apps I have and use.
I’ve delayed moving to Windows 7 because it actually looks worse than Vista - more like OSX.

Cas :slight_smile:

What the heck are you talking about? What is wrong with Linux? What apps are you using that have you locked into Windows?

please dont start this discussion here.
we already have a, still active, thread about this.
here a link: on why I don’t use Linux for example

Agreed.

But anyway: a pure Java solution would be excellent. Next most excellent is a Windows-based solution, which I currently have; I use NSIS for the final Windows build step. For Mac it’s just a simple case of zipping; for Linux I’ve got a (buggy) Java Debian package building ant task.

Cas :slight_smile: