I have a simple JavaFX application, and I want to create an installer for Windows machines. javafx-maven-plugin works and creates the application executable together with the Windows installer, but the problem is that it creates the Windows installer with the JavaFX application inside and the full JRE too.
So, how can I do to create my own files for Windows using javafx-maven-plugin , without having a complete Java structure. Perhaps he should only create a platform for the Java Framework. This inflates the installer from 1.5 MB to 200 MB of disk space.
With Maven, I use the mvn clean compile jfx:build-jar jfx:native to get my own files on Windows, and here is the POM file that I use:
<?xml version="1.0"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.demo</groupId> <artifactId>hello-javafx-maven-example</artifactId> <name>JavaFX Example Maven Project</name> <organization> <name>Jaa Demo</name> </organization> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <build> <plugins> <plugin> <groupId>com.zenjava</groupId> <artifactId>javafx-maven-plugin</artifactId> <version>8.1.3</version> <configuration> <mainClass>com.demo.helloWorld</mainClass> </configuration> </plugin> </plugins> </build> </project>
source share