0

I create a simple project where I want to create windows image. I have a maven project with maven-jlink-plugin. I am using Netbeans and Widows 10. When I create the image it looks like fine but I do not see the .bath file.

        <artifactId>maven-jlink-plugin</artifactId>
            <version>3.1.0</version>
            <extensions>true</extensions>
            <configuration>
                <strinpDebug>true</strinpDebug>
                <noHeaderFiles>true</noHeaderFiles>
               
                <jlinkImageName>hello</jlinkImageName>
                <mainClass>com.todlist.testingapp.HelloWorld</mainClass>
                <noManPages>true</noManPages>
            </configuration>

enter image description here

can someone know which is the error or what I need to fix/change?

jean
  • 3
  • 1
  • 1
    What kind of `bat` file do you expect? – khmarbaise Mar 28 '21 at 16:23
  • When I do that process with Maven JavaFX project I can create a hello.bat which with double click runs the app. I want to do something like that with that no JavaFX project. – jean Mar 29 '21 at 23:53
  • Hm..where should the `bat` file coming from? Who should create that? – khmarbaise Mar 30 '21 at 07:37
  • For example I creted a JavaFx project where it creates the Java Jlink image with the bat file I can run in wondows to open the app. – jean Apr 07 '21 at 02:42

1 Answers1

0

Change the configuration part to become like this:

<configuration>
   <launcher>FILENAME=ARTIFACTID/PACKAGE.MAINCLASS</launcher> 
</configuration>

Where FILENAME is the name of the launcher file you want ARTIFACTID is the artifactId of your maven module PACKAGE is the package where your main class is located MAINCLASS is the name of your main class

Example: you have a module with the artifact ID Prototype, a main class called Program in a package called com.test.main, and you want a hello.bat file as your launcher, you get: hello=Prototype/com.test.main.Program