B4J Question Error making executable updating jGoogleMaps

jGubern

Member
Licensed User
Longtime User
Hi guys,

I realized a few days ago that an old project where the jGoogleMaps library participates was not working properly for me (it did not load the map).

Adapt the code according to:
https://www.b4x.com/android/forum/threads/jgooglemaps-library.56744/

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)



any suggestions?

Thank you
 

jahswant

Well-Known Member
Licensed User
Longtime User
Tutorial was updated and you must upgrade to open jdk 19.

 
Upvote 0

jGubern

Member
Licensed User
Longtime User
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)

Thank you anyway
 
Upvote 0

jahswant

Well-Known Member
Licensed User
Longtime User
It’s working good here. I had this issue I think I restart b4j maybe the computer and cleaned the project!
 
Upvote 0

jGubern

Member
Licensed User
Longtime User
Likewise,
it is curious that my program works perfectly in debug mode and not in release mode......
 
Upvote 0

jGubern

Member
Licensed User
Longtime User
Thanks for your interest, @Erel.
It is a case that only happens in this particular project.

Fortunately, I have already found the source of the error, and it is due to a file in my project with the name:

'Sin título-1.png'

If I delete or rename it without accent, I can use release mode and use standalone packager without problems.

It seems like an issue related to character encoding.....

Thank you very much to everyone for your help !!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…