B4J Question B4jPackager11 + Jasper = Error

DarkoT

Active Member
Licensed User
Hi guys...

Need Help... I'm finish with my first more complex project which using B4J desktop app with integrated Jasper report. When I want do distribute my application and using integrated packager for build Win exe, i receive a error:



how can I add package for groovy.plugins into project? I found similar problem solved by @Erel - here: https://www.b4x.com/android/forum/threads/solved-b4jpackager11-jasperreports-error.115168/page-3

But there is no solution, which will help me... Basicaly - how it's posible to add groovy to project? I try with both possibilities:
#PackagerProperty: IncludedModules = org.codehaus.groovy:groovy-all:2.4.3
#PackagerProperty: AdditionalModuleInfoString = use org.codehaus.groovy:groovy-all:2.4.3;

and received a error...
(sorry, this is my first b4j "not simple" project and need help)...

Thank's DaT
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This one is simple.
B4X:
#PackagerProperty: VMArgs = --add-opens b4j/net.sf.jasperreports.engine.fill=ALL-UNNAMED --add-opens b4j/net.sf.jasperreports.compilers=ALL-UNNAMED
Note that in the next version of B4J it will be possible to set the same property multiple times. For now you need to do it in a single line.
 
Upvote 0

DarkoT

Active Member
Licensed User
I try to add all missed rutines into #PackagerProperty and still not working... I get the next error:


My run_debug.bat since to be to long?:

java.exe @release_java_modules.txt --add-opens b4j/net.sf.jasperreports.engine.fill=ALL-UNNAMED --add-opens b4j/net.sf.jasperreports.compilers=ALL-UNNAMED --add-opens b4j/groovy.lang=ALL-UNNAMED --add-opens b4j/org.codehaus.groovy.runtime.callsite=ALL-UNNAMED --add-opens b4j/org.codehaus.groovy.runtime=ALL-UNNAMED --add-opens b4j/org.codehaus.groovy.reflection=ALL-UNNAMED -m b4j/b4j.example.main
 
Upvote 0

DarkoT

Active Member
Licensed User
I'm still confused and can not understand - why the system works perfect when I start the application from B4J development tool (in release/debug mode) and can not distribute this application to another machine... Or other applications which I created working perfect - on every linux and win machine... Only this case which should PRINT Delivery Note (created in Jasper Studio) will not work... Maybe I need to switch to another report designer.... Any suggestion what should I use? What will be best to create Delivery Note and other operative print-outs and will be "compatible" with B4J?
Suggest me..

Thx, DaT
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
why the system works perfect when I start the application from B4J development tool (in release/debug mode) and can not distribute this application to another machine.
As I wrote before, the Jasper library is an old and complex library which isn't compatible with Java 9+ modules system.

I recommend you to use Java 8 and either distribute the jar itself and rely on Java being installed on the user computer or pack it with the old Packager tool (not B4JPackager11).
 
Upvote 0

DarkoT

Active Member
Licensed User
Okay, understand... But - in any case - I will switch to another reporting tool; because - I want to stay on B4J!!! It's really nice programmers tool with great community (people making real world!)... And want to be part of this world... So, please, suggest me which reporting tool should I use for creating a operative reporting (Invoices, Delivery notes, ...)

Best regards and thanks for help...

DaT
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Okay, understand... But - in any case - I will switch to another reporting tool; because - I want to stay on B4J!!!
You misunderstood me. Stay on B4J. Use Java 8 instead of Java 11 (Tools - Configure Paths) and use this tool to create a standalone package: https://www.b4x.com/android/forum/threads/ui-apps-packaging-self-contained-installers.56854/#content

You can also skip the package at all and distribute the compiled jar. Users will be able to double click to run it, if Java 8 is installed on their computers.
 
Upvote 0

DarkoT

Active Member
Licensed User
Okay, I will try also this option... In any case - I will switch to another reporting tool.... Can you make some suggestion which will be best for using "standard" B4J environment?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…