Invalid data: Minimum JRE version should be x.x.x[_xx]
mbachinger opened this issue · comments
I am attempting to use this plugin with my Java application using Java 11. I keep getting the error:
net.sf.launch4j.BuilderException: Invalid data: Minimum JRE version should be x.x.x[_xx]
Does this plugin not work with Java 11?
@mbachinger take a look at the documentation mentioning
<minVersion>, <maxVersion> format - Java >= 9
The new version format is xxx[.xxx[.xxx]] where only 1 part is required and the update version after the underscore is not allowed.
- 1.6
- 9
- 10.0.1
@TheBoegl
Thanks for the reply. I am not specifying the underscore or the portion after though. I have tried:
- 11
- 11.0
- 11.0.5
I also tried setting the targetCompatibility since this overrides it.
Versions 9 and under work but 10 and 11 don't.
This is the createExe.xml being created before running into that error:
<?xml version='1.0' encoding='UTF-8'?>
<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>lib/wdirclient-4.4.jar</jar>
<outfile>wdirclient.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>normal</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl></supportUrl>
<stayAlive>false</stayAlive>
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon>..\..\src\dist\favicon.ico</icon>
<classPath>
<mainClass>wdirclient.WesternDirectoryClient</mainClass>
<cp>lib\wdirclient-4.4.jar</cp>
</classPath>
<jre>
<path></path>
<bundledJre64Bit>false</bundledJre64Bit>
<bundledJreAsFallback>false</bundledJreAsFallback>
<minVersion>11.0.0</minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
</jre>
<versionInfo>
<fileVersion>4.4.0.0</fileVersion>
<txtFileVersion>4.4</txtFileVersion>
<fileDescription>wdirclient</fileDescription>
<copyright>unknown</copyright>
<productVersion>4.4.0.0</productVersion>
<txtProductVersion>4.4</txtProductVersion>
<productName>wdirclient</productName>
<companyName></companyName>
<internalName>wdirclient</internalName>
<originalFilename>wdirclient.exe</originalFilename>
<trademarks></trademarks>
<language>ENGLISH_US</language>
</versionInfo>
</launch4jConfig>
<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>lib/wdirclient-4.4.jar</jar>
<outfile>wdirclient.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>normal</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl></supportUrl>
<stayAlive>false</stayAlive>
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon>..\..\src\dist\favicon.ico</icon>
<classPath>
<mainClass>wdirclient.WesternDirectoryClient</mainClass>
<cp>lib\wdirclient-4.4.jar</cp>
</classPath>
<jre>
<path></path>
<bundledJre64Bit>false</bundledJre64Bit>
<bundledJreAsFallback>false</bundledJreAsFallback>
<minVersion>11.0.0</minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
</jre>
<versionInfo>
<fileVersion>4.4.0.0</fileVersion>
<txtFileVersion>4.4</txtFileVersion>
<fileDescription>wdirclient</fileDescription>
<copyright>unknown</copyright>
<productVersion>4.4.0.0</productVersion>
<txtProductVersion>4.4</txtProductVersion>
<productName>wdirclient</productName>
<companyName></companyName>
<internalName>wdirclient</internalName>
<originalFilename>wdirclient.exe</originalFilename>
<trademarks></trademarks>
<language>ENGLISH_US</language>
</versionInfo>
</launch4jConfig>
@mbachinger I've edited your answer to display your xml output as code block.
I'm unable to reproduce your error. Please provide a minimal reproducible example. Creating the executable with your provided xml works for me.
@TheBoegl Changing the Launch4j version to 2.4.4 fixed the problem.
@mbachinger Are you referring to this plugin in version 2.4.4 from 2018? To really help you please attach a failing project configuration or a link to a repository. I'm still unable to reproduce this issue.