Open AmirAli-AZ opened 1 year ago
As explained in the jpackage doc, the app-image
type is used to "test your application before creating an installable package".
Since you probably want an installable package, remove the following lines from the jpackage
block:
installerType = 'app-image'
targetPlatform('linux-x86_64', '/usr/lib/jvm/java-17-openjdk')
Run the Gradle build again and you should find the installable package (rpm or deb) under build/jpackage
. Under build/image
you'll find the runtime image and under build/jpackage/Wally
you should find the application image.
If you get an error, you may need to put the following line in the jpackage
block:
jpackageHome = '/usr/lib/jvm/java-17-openjdk'
i did but i still don't see installable package
That's strange. Please run ./gradlew -i clean jpackage
and post the output of the jpackage
task.
> Task :jpackage FAILED
Caching disabled for task ':jpackage' because:
Build cache is disabled
Task ':jpackage' is not up-to-date because:
Task has failed previously.
Watching 138 directories to track changes
Watching 109 directories to track changes
runtimeImageDir: /home/amiran/IdeaProjects/Wally/build/image
taskData: org.beryx.jlink.data.JPackageTaskData(moduleName:com.amirali.wally, mainClass:com.amirali.wally.App, customImageData:null, imageDir:/home/amiran/IdeaProjects/Wally/build/extension 'jlink' property 'imageName', runtimeImageDir:/home/amiran/IdeaProjects/Wally/build/image, jpackageData:org.beryx.jlink.data.JPackageData(jpackageHome:, outputDir:jpackage, imageOutputDir:/home/amiran/IdeaProjects/Wally/build/jpackage, imageName:Wally, imageOptions:[], resourceDir:null, targetPlatformName:null, skipInstaller:false, installerType:null, installerOutputDir:/home/amiran/IdeaProjects/Wally/build/jpackage, installerName:Wally, appVersion:null, vendor:Unknown, icon:null, installerOptions:[--app-version, 1.0-SNAPSHOT], args:[], jvmArgs:[], defaultJPackageHome:/usr/lib/jvm/java-17-openjdk, secondaryLaunchers:[], launcherName:app, JPackageHomeOrDefault:/usr/lib/jvm/java-17-openjdk))
Starting process 'command '/usr/lib/jvm/java-17-openjdk/bin/jpackage''. Working directory: /home/amiran/IdeaProjects/Wally Command: /usr/lib/jvm/java-17-openjdk/bin/jpackage --type rpm --dest /home/amiran/IdeaProjects/Wally/build/jpackage --name Wally --app-version 1.0-SNAPSHOT --vendor Unknown --app-image /home/amiran/IdeaProjects/Wally/build/jpackage/Wally --app-version 1.0-SNAPSHOT
Successfully started process 'command '/usr/lib/jvm/java-17-openjdk/bin/jpackage''
Error: Invalid or unsupported type: [rpm]
Watching 133 directories to track changes
Watching 162 directories to track changes
Invalid or unsupported type: [rpm]
Execution failed for task ':jpackage'.
> Process 'command '/usr/lib/jvm/java-17-openjdk/bin/jpackage'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
so i think jpackage doesn't support arch and arch based distributions
What happens if you configure installerType = 'deb'
?
nope, even app-image doesn't work I thought app-image will work with all linux distributions
@AmirAli-AZ are you still having this issue?
Does anything changed? I don't know, I'll test later
Try with JDK 17.0.8, there were some bugs related to jpackage fixed there.
Hi I'm trying to generate an appimage for my javafx app but it does not generate any appimage