I'm trying to deploy my videogame using JavaPackager. It works but the default icon of the aplication can not be changed. It is always a cup of coffee. I have tried also JPackage - it works with my icon without problems. What can be wrong? My deployment Gradle-script:
task packageMyApp(type: io.github.fvarrui.javapackager.gradle.PackageTask, dependsOn: build) {
mainClass = mainClassName
organizationName = "NAME"
organizationUrl = "HOMEPAGE"
organizationEmail = "EMAIL"
generateInstaller = false;
bundleJre = true
displayName = "TITLE NAME"
url = 'PAGE'
administratorRequired = false
platform = "windows"
]
winConfig {
System.out.println("Exported for Windows")
File file = (new File('Build' + File.separator + 'Girl_of_war_deployment_master.ico'))
boolean exists = file.exists();
if (exists) {
System.out.println("Icon file exists")
}
try {
if (exists) {
winConfig.setIcoFile(file);
}
}
catch (Exception e){
e.printStackTrace();
}
}
I receive the next exception:
Execution failed for task ':packageMyApp'. java.lang.Exception: Build\Girl_of_war_deployment_master.ico * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.
What can be wrong? Meybe there are another "dirty" methods to change the default icon of the JavaPackager?
I have changed the icon directly in the Gradle cached library.
The JavaPackager works correct but the icon in the directory only seems to be unchanged (with the cup of coffee). When I copy/move the content of the build directory in a new directory - the icon of the .EXE changes its picture. All I need is to transfer the build content in an another folder to see the right result.