Home
Neolan
minecraft
Todo
Amadeus
Admin
Home
Article
11
Development
12-01-2023
Java: Create an EXE from Maven project
Here are the steps to create and EXE from a Maven project: [code]<plugin> <groupId>com.akathist.maven.plugins.launch4j</groupId> <artifactId>launch4j-maven-plugin</artifactId> <version>2.1.3</version> <executions> <execution> <id>l4j-gui</id> <phase>package</phase> <goals> <goal>launch4j</goal> </goals> <configuration> <headerType>gui</headerType> <outfile>target/MySoftware.exe</outfile> <jar>target/myjar.jar</jar> <dontWrapJar>false</dontWrapJar> <errTitle>Error in launch4j plugin</errTitle> <icon>src/main/resources/images/sbiworker_logo_2.ico</icon> <jre> <minVersion>11</minVersion> <maxVersion>17</maxVersion> <initialHeapSize>512</initialHeapSize> <maxHeapSize>2048</maxHeapSize> <opts> <opt>-Dlog4j.configurationFile=conf/log4j2.xml</opt> </opts> </jre> <versionInfo> <fileVersion>1.0.0.0</fileVersion> <txtFileVersion>1.0.0.0</txtFileVersion> <fileDescription>des</fileDescription> <copyright>Copyright (c) 2022 </copyright> <companyName>Company</companyName> <productVersion>3.0.0.0</productVersion> <txtProductVersion>${project.version}</txtProductVersion> <productName>MySoftware</productName> <internalName>MySoftware</internalName> <originalFilename>MySoftware.exe</originalFilename> </versionInfo> </configuration> </execution> </executions> </plugin> [/code]
Linked in
Stephane
Développeur, web-designer, gamer... J’ai développé ce blog pour regrouper mes envies, mes créations et les choses que j’aimerais partager sans vraiment savoir où les mettre. Bienvenue dans mon monde !