I am trying to package my JavaFX application into an executable fat JAR, but it never works. I have tried several guides found online including aswers here on SO but I had no luck. I can manage to set the main class correctly, but the class path is always missing, which then throws an error that JavaFx runtime components are missing. I am now using maven-shade-plugin
(I have tried other plugins) and here is the configuration in pom.xml
:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.sjsm.App</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
Edit: as requested in the comments I am adding 3 links I used and none of them worked. Also note I have tried other sources than these over the past 2 or so weeks.