JavaFX Tutorial 59 - EXE Installer for JavaFX 8 Application

preview_player
Показать описание
In this tutorial I will show you how to create an EXE installer for JavaFX application on Windows 10 x64. As of JavaFX 2.2, in order to generate an EXE package, you must have Inno Setup 5.5 or higher installed and available on the PATH.

To install Inno Setup:

2. Double-click the file to launch the installer.
3. Accept the Inno Setup license agreement and click Next.
4. Follow the instructions in the install wizard for installing Inno Setup.

To add Inno Setup to the system Path variable:

1. On Windows 10, Computer, Properties, System Properties, Advanced system settings.
2. Select the Advanced tab and click the Environment Variables button.
3. In the System Variables pane, double-click the PATH variable.
4. In the Edit System Variable dialog box, add a semicolon followed by a new path to the Variable value field. for example, C:\Program Files (x86)\Inno Setup 6)
5. Click OK to close all the open dialog boxes.

To create EXE Packaging in JavaFX Projects
1. Right-click the project node in the Projects window and select Properties from the context menu.
2. In the Project Properties dialog box, choose Deployment in the Build category and select the Enable Native Packaging option.
3. Click OK.
4. To clean and build your project, Choose Run, Clean and Build Project from the main menu.

For example,

These instructions will produce a self-contained application package in the form of an .exe file.

By default, per-user installation copies the package into a private user directory and does not require admin permissions.

%LOCALAPPDATA%

e.g. C:\Users\username\AppData\Local\

If you chose system-wide installation, System-wide installation results in a package installed into a shared location and can be used by any user on the system.

%ProgramFiles%

e.g. C:\Program Files

Q: I got an error of
JavaFX deployment library not found in active JDK.
Please check that the JDK is correctly installed and its version is at least 7u4 on Mac or 7u6 on other systems.
BUILD FAILED (total time: 2 seconds)

A: Try to use JDK 8.

#javafx #EXEInstaller # InnoSetup
Рекомендации по теме
Комментарии
Автор

does this method work only using JDK 8 & Java FX 8?
on my PC I am using JKD 15 along with JavaFX 15.0.1 for building an application. What would the procedure should adopt? do you have any tutorial teaching how to build an EXE with JKD 15 / JavaFX 15?

edgarcostamelo
Автор

Hey. I am getting this error when i try to build the application after pasting the files you shared. The prefix "fx" for element "fx:deploy" is not bound. Your assistance will be appreciated

webeltech
Автор

This is nice.how do i include a pdf file i want to view from my application during packaging and have it available during the program?

austineadah