Here's my simple JavaFX app that I am able to build a native installer using jfx:native
with Maven:
public class HelloWorld extends Application {
public static void main(String... args){
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
System.out.println("Hello world!");
}
}
The installer is being created when running that maven build.
- What could be the possible reasons for issues that even running the exe file installed by the installer the Main class would not execute (in this case "Hello Word!" does not show up in the console as expected?
- In what way the maven plugin below can be tweaked such that the installation of the native package will add the exe into the PATH?
Here's the section of the POM for JavaFX:
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.7.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>native</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.mycompany.HelloWorld</mainClass>
<nativeInstallers/>
</configuration>
</plugin>