{"id":13777271,"url":"https://github.com/edvin/fxlauncher","last_synced_at":"2025-04-12T18:49:54.175Z","repository":{"id":53541741,"uuid":"50748074","full_name":"edvin/fxlauncher","owner":"edvin","description":"Auto updating launcher for JavaFX Applications","archived":false,"fork":false,"pushed_at":"2021-01-10T19:07:12.000Z","size":225,"stargazers_count":719,"open_issues_count":56,"forks_count":110,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-04-04T22:43:38.778Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edvin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-30T22:31:39.000Z","updated_at":"2025-03-28T00:20:04.000Z","dependencies_parsed_at":"2022-08-13T02:40:42.697Z","dependency_job_id":null,"html_url":"https://github.com/edvin/fxlauncher","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edvin%2Ffxlauncher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edvin%2Ffxlauncher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edvin%2Ffxlauncher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edvin%2Ffxlauncher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edvin","download_url":"https://codeload.github.com/edvin/fxlauncher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618218,"owners_count":21134199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T18:00:40.710Z","updated_at":"2025-04-12T18:49:54.129Z","avatar_url":"https://github.com/edvin.png","language":"Java","funding_links":[],"categories":["Libraries, Tools and Projects","Java","Community"],"sub_categories":["Tools"],"readme":"# FXLauncher\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/no.tornado/fxlauncher/badge.svg?cacheBust=true)](https://search.maven.org/#search|ga|1|no.tornado.fxlauncher)\n[![Apache License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\nAuto updating launcher for JavaFX Applications. Combined with JavaFX native packaging, you get\na native installer with automatic app updates.\n\nYou can see the launcher in action in this [Demo Application](http://fxldemo.tornado.no).\n\n### QuickStart projects\n\n- [Maven Example](https://github.com/edvin/fxldemo) with [pom.xml](https://github.com/edvin/fxldemo/blob/master/pom.xml)\n- [Gradle Example](https://github.com/edvin/fxldemo-gradle) with [build.gradle](https://github.com/edvin/fxldemo-gradle/blob/master/build.gradle)\n\n### Changelog\n\nCheck out [the changelog](https://github.com/edvin/fxlauncher/blob/master/CHANGELOG.md) for a list of all updates to the project.\n\n### Video demonstration\n \t\nSee the launcher in action in this short [screencast](https://www.youtube.com/watch?v=NCP9wjRPQ14). There is also a [video](https://www.youtube.com/watch?v=-6PlFVUgntU) about customizing the update user interface.\n\n## How does it work?\n\nFXLauncher is a 18Kb jar that can be used to boot your application. It knows the location\nof your application repository where you host all the app resources.\n\nSee a manifest [example here](http://fxldemo.tornado.no/app.xml). FXLauncher will look up the\nremote repository to check for a newer version of the manifest on each startup.\n \nAfter the manifest is retrieved, FXLauncher synchronizes every file mentioned in the manifest while \nproviding the user with a progress indicator. After all resources are in sync, a classloader is \ninitialized with all the resources from the manifest.\n \nLastly, the application entry point retrieved from the manifest is invoked. Everything happens in-JVM, no restarts needed.\n\nBefore each run, the launcher will synchronize all resources and seamlessly launch an always updated application.\n\n## How to use FXLauncher\n\nSee the QuickStart projects at the top of the README for information on integrating FXLauncher in your build system.\n\n### Adhoc usage\n\t\nFXLauncher can also be used to launch an application at an arbitrary url by specifying the `--app` parameter at startup:\n\t\n```bash\njava -jar fxlauncher.jar --app=http://remote/location/app.xml\n```\n\nAlternatively (or in combination with `--app...`), you can override the uri attribute in the manifest (`app.xml`) so that both `app.xml` and all resources are loaded from the specified uri. This is especially useful for testing the complete setup locally or from a staging environment.\n\n```bash\njava -jar fxlauncher.jar --uri=http://remote/location/\n```\n\nThe two parameters also work in tandem, allowing you to load a specified manifest from one URL and override its uri.\n\n```bash\njava -jar fxlauncher.jar --app=http://remote/location/app.xml --uri=http://remote/location/\n```\n\nNote: All parameters (including these) are passed on to your application.  So please ensure that your parameters have a different name if they carry different data.\n\n#### Include other artifacts\n\n`--include-extensions` accepts a comma separated list of filename extensions to include of other resources from the build dir. By default it always includes jar, war.\n\n#### Class-Loader issues\n\nTo load the application FXLauncher creates a new classloader fed with the classes of your manifest. This works as long as none of the\nclasses uses the system classloader to load one of your classes or resources which is not aware of the application classes then.\n\nOne example is Java's `java.net.URL` class which uses `Class.forName` to load a custom handler, which uses the classloader of\nthe callee which is the system classloader then.\n\nTo workaround that problem you could setup a special FXLauncher classloader which allows a different strategy how to feed the classpath\nwith additional classpath entries.\n\n```bash\njava -Djava.system.class.loader=fxlauncher.FxlauncherClassCloader -jar fxlauncher.jar --app=http://remote/location/app.xml\n```\n\n### Headless\n\nFXLauncher allows you to run in headless mode and thus be used not only for JavaFX applications, but also for e.g. services which run\nwithout any gui at all.\n\nFor this to work you could use `fxlauncher.HeadlessMainLauncher`\n\n```bash\njava -classpath fxlauncher.jar fxlauncher.HeadlessMainLauncher --app=http://remote/location/app.xml\n```\n\nNotice: `WhatsNew` is not supported.\n\n### File based deployment\n\nThe app uri can be a `file://` based url instead of a web uri if your application is hosted on a common network location for your users.\n\n#### UNC Paths\nFXLauncher can deal with [UNC paths], if you ask it nicely. Instead of `\\\\server\\share\\myapp` use `file:////server/share/myapp`.\nYes, that's four forward slashes; two for the `file://` protocol and two for the UNC path.\n\n[UNC paths]: https://www.lifewire.com/unc-universal-naming-convention-818230\n\n### Native installers\n\nThe native installer does not contain any application code, only the launcher. There is\n\tno need to rebuild your native installer when you update your project, simply run the `deploy-app` goal\n\tand all users will run the newest version on their next startup. Point users to the `fxlauncher.jar` or\n\t to a native installer if you wish.\n\t\n### Try a native installer\n\t\nCheck out these prebuilt installers for a more complex demo application\n\n- [MacOSX](http://fxldemo.tornado.no/FxlDemo-2.0.dmg)\n- [Windows](http://fxldemo.tornado.no/FxlDemo-2.0.exe)\n- [Linux](http://fxldemo.tornado.no/fxldemo-2.0.deb)\n\n## Specify cache directory\n\nBy default, the artifacts are downloaded to the current working directory. This is usually fine for per-user native \ninstallers, but if you distribute your application via a system-wide native installer, or just the launcher \njar, you might want to specify where the downloaded artifacts land. See the \n[cache dir documentation] for more information.\n\n[cache dir documentation]: https://github.com/edvin/fxlauncher/wiki/Optional-Cache-Directory\n\n## Installation location\n\nIt's worth noting that the two package alternatives for Windows, (EXE and MSI) have different default install locations.\nWhile EXE will default to [`%LocalAppData%`], the MSI installer will default to `%ProgramFiles%`.  To write to \n`%ProgramFiles%` one definitely does need admin privileges—that poses a problem for FXLauncher which, by default, \ndownloads updates to where it was installed. \n\nIf you use the MSI installer you will therefore need to tell FXLauncher to cache artifacts somewhere it is allowed\nto put them. For an OS-independent answer to this problem, look no further than the \n[two magical strings][cache dir documentation], `USERLIB` and `ALLUSERS`. \n\n\n[`%LocalAppData%`]: https://www.howtogeek.com/318177/what-is-the-appdata-folder-in-windows/\n\nRead more about Java Packager in the official documentation:\n\nhttps://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html\n\n## Accept downgrades\n\nFXLauncher will not download a remote version if the local version is newer. This is controlled\nby comparing a timestamp in the manifest. Specifying `--accept-downgrades=true` as the last argument to CreateManifest will\nallow you to make sure that the version you have published will always be used by your clients even if they have a newer version installed.\nThis option is also available in the Gradle plugin as `acceptDowngrades`.\n\n## Ignore ssl errors.\n\nIf you are behind a proxy that does a _man in the middle attack_ to snoop on ssl connections, you can use the\n```--ignoressl``` commandline option to ignore the ssl errors this will generate.\n\n## Stop after update errors.\n\nNormally FXlauncher will try to launch the application even if there were errors\nduring the update of the files from the server. Often this will work using the files\nalready in the local cache. You can change this behavior by specifying\n`--stop-on-update-errors=true`. The error will be shown and the launcher will exit.\nSpecifying `--stopOnUpdateErrors` will result in the same behavior, but this variant\nis deprecated and will be removed in future versions. If both options are specified\nthe value of `--stop-on-update-errors` will be used.\n\n## Show what's new dialog.\n\nYou can have FXLauncher show a whats new dialog. This dialog will\nonly be shown when FXLauncher has to download new files from the server. The html will be shown in a `WebView`. Specify `--whats-new=https://whatsnewurl/here`\n\n### Applications with no default UI\n\nBy default the update screen will remain visible until the primary stage is shown. If your application does not show anything on the primary\nstage at startup, the update screen will stay visible until it does. You can pass in `--lingering-update-screen=false` to hide it immediately\nafter the update process has completed.\n\n## A slimmer alternative\n\nInstead of using javapackager to create an installer, you can embed the fxlauncher jar in a native installer system like Advanced Installer—same approach as above, \nbut without using javapackager. With this approach, you can choose whether to include a JRE or have the installer software preinstall it.\nAgain, you are only distributing the launcher with the native installer, the rest is pulled down on demand.\n\n### A note on classloaders\n\nFXLauncher uses a custom classloader to dynamically load the synchronized resources. This classloader is \nthen made available to the `FXMLLoader`. You can access it via `FXMLLoader.getDefaultClassLoader()`.\n\n### Platform specific resources\n\nFXLauncher supports filtering of resources for the running platform. Any resource\nthat ends with `-[mac|win|linux].jar` will only be downloaded and put on the classpath on the corresponding\nplatform. The manifest enforces this though the `os` attribute in `app.xml`.\n\n### Native libraries\n\nIf you need to load native libraries before the custom class loader kicks inn, specify the `--preload-native-libraries=` parameter\nto CreateManifest. It supports a comma separated list of libraries to load. Remember: No extensions, just the library name.\n\n### Custom UI\n\nThere are two ways to customize the appearance of the update UI. Either you can configure the \nsupported style properties in the manifest, or you can provide a custom implementation of the\n[UIProvider](https://github.com/edvin/fxlauncher/blob/master/src/main/java/fxlauncher/UIProvider.java)\nto completely customize the UI. Have a look at this [Custom UI Demo Project](https://github.com/edvin/fxlauncher-custom-ui) for\nmore information about customizing the updater.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedvin%2Ffxlauncher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedvin%2Ffxlauncher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedvin%2Ffxlauncher/lists"}