And the curious thing is that in debug mode, the program works correctly,
but when I try to make the release version or the packaging that generates the exe file, the final objective is not achieved.
When I compile in release mode I get in the log:
Error: An unexpected error occurred while trying to open file C:\...\Objects\geaDesktopComplete.jar
When I'm trying to generate the .exe package
B4JPackager11 Version 1.40
Exe name: geaDesktopComplete.exe
Only Java 11, 14 and 16 are supported (Tools - Configure Paths).
build folder: C:\...\Objects\temp\build
InputJar: C:\...\Objects\geaDesktopComplete.jar
Running: C:\...\GEC565~1\Objects\temp\FindDosPath.exe
Running: C:\Program Files\Java\jdk-19.0.2\bin\jar
java.util.zip.ZipException: invalid CEN header (bad entry name or comment)
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1615)
at java.base/java.util.zip.ZipFile$Source.checkAndAddEntry(ZipFile.java:1219)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1554)
at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1329)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1292)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:710)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:143)
at jdk.jartool/sun.tools.jar.Main.extract(Main.java:1406)
at jdk.jartool/sun.tools.jar.Main.run(Main.java:385)
at jdk.jartool/sun.tools.jar.Main.main(Main.java:1698)
This library is similar to B4A and B4i GoogleMaps libraries. It is based on this open source project: https://github.com/dlsc-software-consulting-gmbh/GMapsFX/ (Apache 2 license). Under the hood it uses JavaFX WebView with GoogleMaps JavaScript API V3. Using the map is quite simple. You need...
Hello jahswant,
As you can see in the previous post, I already use that version of jdk...
B4JPackager11 Version 1.40
Exe name: geaDesktopComplete.exe
Only Java 11, 14 and 16 are supported (Tools - Configure Paths).
build folder: C:\...\Objects\temp\build
InputJar: C:\...\Objects\geaDesktopComplete.jar
Running: C:\...\GEC565~1\Objects\temp\FindDosPath.exe Running: C:\Program Files\Java\jdk-19.0.2\bin\jar
java.util.zip.ZipException: invalid CEN header (bad entry name or comment)
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1615)
at java.base/java.util.zip.ZipFile$Source.checkAndAddEntry(ZipFile.java:1219)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1554)
at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1329)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1292)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:710)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:143)
at jdk.jartool/sun.tools.jar.Main.extract(Main.java:1406)
at jdk.jartool/sun.tools.jar.Main.run(Main.java:385)
at jdk.jartool/sun.tools.jar.Main.main(Main.java:1698)
It fails to unzip the compiled jar. Does it only happen with this project? Create a new project add the library and the required #PackagerPropery statements and run it.
FWIW, I've just built a standalone package with maps and JDK 19.0.2 and it works.