Mainly about the argument --executable=...
While the document mentioned a file named "QtJambiLauncher.exe" to deploy on windows,I didn't find how to get or produce it.
Also the manual mentioned that it can be ignored when native jar is in classpath,but some error occurs like npe.
Build gradle script:(path did some shorten for reading)
tasks.create("buildExe") {
dependsOn(tasks.build)
doLast {
exec {
val classPath = sourceSets.main.get().runtimeClasspath.asPath
setCommandLine(
"java",
"-Djava.library.path=$classPath",
"-p", "qtjambi-deployer-6.6.1.jar;qtjambi-6.6.1.jar;",
"-m", "qtjambi.deployer", "app",
"--application=MyCompanyApp",
"--platform=windows-x64",
// "--executable=utilities/QtJambiLauncher.exe",
"--autodetect-jvm",
"--main-class=org.example.ApplicationMain",
"--dir=deploy",
)
println("---buildExe done")
}
}
}
Error info:
Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "<local9>" is null
at [email protected]/io.qt.qtjambi.deployer.Main.findSpecs(Main.java:214)
at [email protected]/io.qt.qtjambi.deployer.AppGenerator.generate(AppGenerator.java:265)
at [email protected]/io.qt.qtjambi.deployer.Main.main(Main.java:133)
The document: https://github.com/OmixVisualization/qtjambi/blob/master/www/How-to-deploy-QtJambi-applications.md
versions:
openjdk 17
gradle 8.4
qtjambi 6.6.1
native jar windows-x64 6.6.1 with qt mscv2019 installed