If you do not want an installer you can disable it with generateInstaller = false
.
Just in case, this is my java packager config that I use to package a test app for all platforms.
javapackager {
// common configuration
// mandatory
mainClass = mainClassName
// optional
bundleJre = true
customizedJre = true
generateInstaller = false
administratorRequired = false
additionalResources = files('blue-cube.l4j.ini', 'src/dist/config', 'src/dist/assets', 'src/dist/updates').asList()
version = ""
name = "blue-cube"
displayName = "blue-cube"
//vmArgs = applicationDefaultJvmArgs //loaded via l4j.ini file
classpath = "libs/*;assets;config"
manifest {
additionalEntries = [
'Class-Path': '' // clear manifest classpath as I am going to pass it via -cp command from start script.
]
}
linuxConfig {
pngFile = file('icon.png')
// Wraps JAR file inside the executable if true
wrapJar = true
}
macConfig {
icnsFile = file('icon.icns')
relocateJar = false
}
winConfig {
icoFile = file('icon.ico')
// Wrap JAR file in native EXE
wrapJar = true
}
}
task packageForLinux(type: io.github.fvarrui.javapackager.gradle.PackageTask, dependsOn: build) {
platform = io.github.fvarrui.javapackager.model.Platform.linux
createTarball = true
//jdkPath = file('X:\\path\to\linux\jdk')
outputDirectory = file("$buildDir/bundles/linux-x64")
additionalResources = javapackager.additionalResources + [file('blue-cube.desktop')]
}
task packageForLinuxArm(type: io.github.fvarrui.javapackager.gradle.PackageTask, dependsOn: build) {
platform = io.github.fvarrui.javapackager.model.Platform.linux
createTarball = true
jdkPath = file('/home/ali/opt/jvm/jdk-14.0.2+12-linux-aarch64')
outputDirectory = file("$buildDir/bundles/linux-aarch64")
}
task packageForMac(type: io.github.fvarrui.javapackager.gradle.PackageTask, dependsOn: build) {
platform = io.github.fvarrui.javapackager.model.Platform.mac
createTarball = true
vmArgs = ['-XstartOnFirstThread']
jdkPath = file('/home/ali/opt/jvm/jdk-14.0.2+12-mac-x64/jdk-14.0.2+12/Contents/Home/')
outputDirectory = file("$buildDir/bundles/mac-x64")
}
task packageForWindows(type: io.github.fvarrui.javapackager.gradle.PackageTask, dependsOn: build) {
platform = io.github.fvarrui.javapackager.model.Platform.windows
createZipball = true
jdkPath = file('/home/ali/opt/jvm/jdk-17.0.2+8-win-x64')
outputDirectory = file("$buildDir/bundles/win-x64")
}
task packageMyApp(dependsOn: [ 'packageForLinux', 'packageForLinuxArm', 'packageForMac', 'packageForWindows'])