B4J Question B4JPackager11 + jPOI Problems [Solved]

Carlos marin

Active Member
Licensed User
Longtime User
Hello experts, I have a problem when packaging my application with JPOI, the project in relase mode works wonderfully and exports to excel without problems,
but When the application is packed, it closes, I have followed all the steps in the tutorial for its execution but it remains the same. does anyone have a solution?

mi code
#PackagerProperty: IconFile = ..\Files\icona.ico
#PackagerProperty: ExeName = Dashboard

#PackagerProperty: AdditionalModuleInfoString = opens schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443;
#PackagerProperty: IncludedModules = jdk.charsets, javafx.web
#PackagerProperty: AdditionalModuleInfoString = exports com.lynden.gmapsfx.javascript.event;
#PackagerProperty: IncludedModules = jdk.crypto.ec
#PackagerProperty: IconFile = ..\icona.ico
#CustomBuildAction: After Packager, C:\Program Files (x86)\Inno Setup 6\Compil32.exe, /cc ../InstallerScript.iss
 

bdunkleysmith

Active Member
Licensed User
Longtime User
I believe it may be because you have two #PackageProperty: IncludedModules lines.

As per Tips and special cases in https://www.b4x.com/android/forum/t...-way-to-distribute-standalone-ui-apps.117880/

6. Each PackagerProperty key should appear at most once. So for example if using both WebView and jPOI add: #PackagerProperty: IncludedModules = jdk.charsets, javafx.web

So your two lines probably should be merged to:

B4X:
#PackagerProperty: IncludedModules = jdk.charsets, javafx.web,  jdk.crypto.ec


It may be that the same applies to your #PackagerProperty: AdditionalModuleInfoString lines and I note you have defined the IconFile also twice.
 
Last edited:
Upvote 0

Arnaud

Active Member
Licensed User
Longtime User
Hello,

I need also to use the both AdditionalModuleInfoString :

- exports com.lynden.gmapsfx.javascript.event
- opens schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443

PackagerProperty:
#PackagerProperty: IncludedModules = jdk.charsets, javafx.web
#PackagerProperty: AdditionalModuleInfoString = exports com.lynden.gmapsfx.javascript.event;
#PackagerProperty: AdditionalModuleInfoString = opens schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443;

#PackagerProperty: IconFile = ..\Files\icon.ico
#PackagerProperty: ExeName = ADA

The compilation with B4JPackager11 works fine, but when I test only the second PackagerProperty works fine (schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443)

If I inverse the both lines :

PackagerProperty inverse:
#PackagerProperty: IncludedModules = jdk.charsets, javafx.web
#PackagerProperty: AdditionalModuleInfoString = opens schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443;
#PackagerProperty: AdditionalModuleInfoString = exports com.lynden.gmapsfx.javascript.event

#PackagerProperty: IconFile = ..\Files\icon.ico
#PackagerProperty: ExeName = ADA

Always only the second line works fine (exports com.lynden.gmapsfx.javascript.event). It seems the second line "erase" the first line. Have you this problem maybe ?

Thanks
 
Upvote 0

bdunkleysmith

Active Member
Licensed User
Longtime User
Refer my post #2 which references Tips and special cases, specifically 6. Each PackagerProperty key should appear at most once.

So your two lines probably should be merged to:

B4X:
#PackagerProperty: AdditionalModuleInfoString = opens schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443;, exports com.lynden.gmapsfx.javascript.event;
 
Upvote 0

Arnaud

Active Member
Licensed User
Longtime User
Thanks,

Unfortunately it doesn't work. This generate an error :

error:
B4JPackager11 Version 1.21
Exe name: ADA.exe
InputJar: D:\ALFANO\APP\Windows J\APP\ADA Pro\ALFANO 6 3.7.8\Objects\result.jar
Running: D:\ALFANO\APP\Windows J\APP\ADA Pro\ALFANO 6 3.7.8\Objects\temp\FindDosPath.exe
Running: C:\java\jdk-11.0.1\bin\jar
Package name: b4j.ALFANO6
Running: C:\java\jdk-11.0.1\bin\jdeps
.
.
.
.
.
.
.
.
.
.
.
.
.
Explicitly excluded modules: [javafx.web]
Included modules: [jdk.charsets, javafx.web, java.base, java.desktop, java.logging, java.security.jgss, java.xml, java.xml.crypto, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, jdk.javadoc, jdk.jsobject, java.scripting, jdk.unsupported, java.datatransfer, jdk.unsupported.desktop, jdk.xml.dom]
Running: C:\java\jdk-11.0.1\bin\javac
.
module-info.java:24: error: ';' expected
exports com.lynden.gmapsfx.javascript.event, opens schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443;}
                                           ^
1 error
 

Attachments

  • Capture d’écran 1.png
    Capture d’écran 1.png
    178.6 KB · Views: 214
Upvote 0

Arnaud

Active Member
Licensed User
Longtime User
No problem, all help is welcome !

I have read and try your first post you, without success.

I have received this post also:

 
Upvote 0

Arnaud

Active Member
Licensed User
Longtime User
Sorry, you say right.

I have changed "," by "; " and It works fine.

I have remove the ","

Here my code who works fine:

B4X:
#PackagerProperty: IncludedModules = jdk.charsets, javafx.web
#PackagerProperty: AdditionalModuleInfoString = exports com.lynden.gmapsfx.javascript.event; opens schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443;
'#PackagerProperty: AdditionalModuleInfoString = opens schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443;


Thanks for your collaboration !
 
Upvote 0
Top