Last active
May 29, 2018 02:58
-
-
Save Faz95210/a8f6b4e3449aa8d111ec1ae15574c195 to your computer and use it in GitHub Desktop.
[Create .exe with Java, Launch4J and Gradle] How to generate a .exe in java with gradle and launch4J #Java #Gradle #Launch4J #executable #windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
jcenter() | |
} | |
dependencies { | |
classpath group: 'edu.sc.seis.gradle', name: 'launch4j', version: '2.4.3' // dependency for the launch4J plugin | |
} | |
} | |
apply plugin: 'edu.sc.seis.launch4j' //add the plugin | |
launch4j { | |
mainClassName = 'com.package.your.app.MainClass' // path to the main class | |
icon = "${projectDir}/src/main/resources/icon/icon.ico" //.exe's Icon | |
outfile = 'extracter.exe' // File Name | |
jvmOptions.add("-Xmx1g") | |
jvmOptions.add("-Xms1g") | |
jreMaxVersion = '1.8.9' | |
jdkPreference = 'preferJre' | |
stayAlive = true | |
bundledJre64Bit = true | |
bundledJrePath = 'jre' | |
jar="${projectDir}/build/libs/ecataxtractexec-1.0-SNAPSHOT.jar" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment