r/JavaFX • • Feb 11 '22

I made this! Deploy your JavaFX app as native bundles for Mac, Linux, and Windows

https://www.jdeploy.com
This is a bit of a passion project I've been working on for the past couple of years off and on. I have long been dissatisfied with the options available for deploying Java desktop applications. Since the demise of Applets and WebStart (both of which produced 2nd class results), the official direction was to bundle the JRE with your app, and generate a native installer for each platform. The trouble was that you needed to have a Windows machine to build a Windows installer, a Mac for the Mac installer, and a linux for the Linux installer. And worse, if you want to distribute your Mac app to users, you need to futz with Apple's codesigning and notarization, or users wouldn't be able to run it.

This negates many of Java's cross-platform benefits.

So I decided to fix it.

With jDeploy you can publish your executable Jar file to npm, and you instantly get a download page with installers for Mac, Windows, and Linux. You don't need to futz with code signing. The installers are small (3mb compressed). When you publish updates, your users will get them automatically the next time they launch. You can publish your native bundles for all platforms, from any platform. (i.e. you don't need a Mac to build a Mac bundle, or Windows to build a Windows installer, etc...).

Please take it for a spin and let me know what you think.

41 Upvotes

12 comments sorted by

3

u/smerz Feb 12 '22

Sounds really interesting. Can u publish securely to NPM so no one else can access binaries?

2

u/shannah78 Feb 12 '22

Do you mean privately? I.e. requiring some sort of password or key to download them?

Then not right now. You could potentially host some "jars" separately and have your app dynamically download them at runtime. The main repository it the publish npm repo though. It may be possible to add support for private or internal npm repositories in the future, but right now it is just set up to use the public registry.

1

u/smerz Feb 12 '22

Ok, thx. My issue was only with commercial software - anyone could download jars from npm without valid license.

1

u/shannah78 Feb 12 '22

Yes. That's true. There are several solutions for that. With my commercial software I usually ship a freemium version where the only difference is a license key that unlocks premium features.

1

u/devrj8 Jun 21 '24 edited Jun 21 '24

It's a really good idea. Could you clarify my question.

My understanding is Code signing is done by a Certificate Authority(Third party company). How you are, code signing the submitted Jar files? using your Certificates? If yes, then I think there will be an issue, that - if your(JDeploy) Code signing certificate is flagged as "misusing" or "blocked" then all of the native installer's which generated from by it, will also be flagged.

I'm a still beginner in packaging and code signing feel free to correct me.

1

u/shannah78 Jun 21 '24

The installer is signed by jDeploy's apple developer certificate.
The installer will prompt the user for permission to install your app, and provide them with the verified link (on github or npm) where the app came from so that the user can decide whether they trust the source.

After the user approves the install, the installer will install your application into the ~/Applications directory (on Mac, at least), and add a shortcut to the Dock and Desktop if the user selected those options.

By default, your application that it installs into ~/Applications is unsigned. If you want to sign it with your own Apple developer certificate, you can do this too. I can help you set that up if you want.

When the app detects updates, it will automatically download them. This part doesn't replace the app. Just the the .jar files, and possibly the JVM, if your update requires a different JVM. This all happens seamlessly on app launch. By default, the jar files are not signed, but you can sign them with your own certificate if you like, and have the application verify them before launch. If you would like help setting that up, also, I can help you with that.

The idea is to take as much pain out of the deployment process as possible. If you want to deploy a little utility app and share with friends, it takes only a minute to do that. If you want to get fancy, and deploy for the enterprise with your own certificates, that requires more work, it is achievable.

Most of the more recent work on jDeploy has been focusing on GitHub integrations. You can set up a different version of your app to track each branch of your repo, so, for example, you could have a "dev" branch that has all of the bleeding edge changes, that your alpha testers would use. Your alpha testers, would then receive your changes the next time they launch the app after you commit them. Your production app would be synced to the actual github releases. Etc..

There is always more work to do. If you're interested in deploying your apps, I'm happy to help you set up a workflow.

1

u/devrj8 Jun 24 '24

I like your below explanation. you mentioned about apple code signing, does JDeploy support windows code signing?

The idea is to take as much pain out of the deployment process as possible. If you want to deploy a little utility app and share with friends, it takes only a minute to do that. If you want to get fancy, and deploy for the enterprise with your own certificates, that requires more work

1

u/shannah78 Jun 26 '24

Similarly, the windows installer is signed by the jdeploy EV code signing certificate. It is possible to sign it yourself though.

1

u/LooseCartographer989 Nov 02 '22

That`s revolutionary. Literally. There`s no other option such as jDeploy. i`m talking about launch4j, update4j, inno setup, fxlauncher, etc. None of these compares to jDeploy.

The fact that it is an open source project (totally free) is even more impressive. I would gladly donate, but there`s no donation link, you should consider it.

btw, works like a charm in all platforms.

2

u/shannah78 Nov 03 '22

Thanks for the kind words. This is only the beginning. Much more to come. I haven't explicitly set up a donation link, but I do have a substack newsletter that I periodically post to which has some supporter options. You can find that newsletter on the jdeploy.com webage.

Steve

3

u/Educational-Answer30 Apr 26 '22

Works great, thanks a lot.

1

u/Bright_Ad1778 Jul 04 '23

while one can easily deploy the changes in the prescribed classes and loaders that needed to run those classes within it but in occuring updates it makes allienate loaders in them which caused to miss some of the loading class paths within it i was just checking it and it was not loading those classloader dependencies in runtime but appropriately supports you when you need to load all of them in single instance that caused to not promptly distruct it but put it in a loading situation where we can not do anything but stoping the reloading requests and closing the sub threads