launch4j {
headerType = "console"
mainClassName = "org.springframework.boot.loader.JarLauncher"
bundledJrePath = "Java\\jdk-17"
outfile = "${project.name}-${project.version}.exe"
jarTask = project.tasks.bootJar
jvmOptions = ["-Dfile.encoding=UTF-8", "-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"]
requiresJdk = true
requires64Bit = true
productName = "My Product"
messagesStartupError = "Failed to start"
messagesJreNotFoundError = "Error encountered with bundled JRE"
messagesJreVersionError = "JRE Found, but expected different version"
messagesInstanceAlreadyExists = "App is already running"
}
But when running createExe I get the following error:
No such field net.sf.launch4j.config.Msg.bundledJreErr
---- Debugging information ----
message : No such field net.sf.launch4j.config.Msg.bundledJreErr
field : bundledJreErr
class : net.sf.launch4j.config.Msg
required-type : net.sf.launch4j.config.Msg
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /launch4jConfig/messages/bundledJreErr
class[1] : net.sf.launch4j.config.Config
required-type[1] : net.sf.launch4j.config.Config
version : 1.4.20
-------------------------------
If I remove messagesJreNotFoundError it is successful.
I have been trying to upgrade to the latest version of the plugin (3.0.4). Checking the docs I have changed the config from:
to:
But when running
createExe
I get the following error:If I remove
messagesJreNotFoundError
it is successful.