openjfx / openjfx-docs

Getting started guide for JavaFX 11
BSD 3-Clause "New" or "Revised" License
96 stars 25 forks source link

launcher missing #201

Open TisVeugen opened 3 years ago

TisVeugen commented 3 years ago

I followed the tutorial to “Create a custom runtime image” with Maven. But finally, there is no file named: target\hellofx\bin\launcher, in my directory D:\WORKSPACES\ECLIPSE_2021_06\hellofx\target\image\bin Please help!

authentictech commented 1 year ago

I found the same happens using Netbeans on Ubuntu Linux and creating a JavaFX modular Maven project. When running mvn clean javafx:jlink in the terminal, only the classes are built but no bin/launcher.

I'm guessing something is missing in the tutorial. Any solutions yet?

joshuatrapp commented 1 month ago

I had this same issue. You need to add <launcher>launcher</launcher> to the configuration under <id>default-cli</id> in your pom.xml. Now, when running mvn clean javafx:jlink, you should get the launcher at target/image/bin/launcher.

<execution>
    <!-- Default configuration for running -->
    <!-- Usage: mvn clean javafx:run -->
    <id>default-cli</id>
    <configuration>
        <mainClass>org.example.App</mainClass>
        <launcher>launcher</launcher>
    </configuration>
</execution>

Solved thanks to this stackoverflow post.