B4J Question error creating standalone package

fhersof

Member
Hi everyone, I am using b4j version 8.80 and if I run it from b4j it works fine, but when I try to generate a distribuicon package I get the following error:
.
.
Explicitly excluded modules: [javafx.web]
Included modules: [java.base, java.desktop, java.logging, java.management, java.naming, java.prefs, java.rmi, java.security.jgss, java.sql, java.sql.rowset, java.transaction.xa, java.xml, java.xml.crypto, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, jdk.security.auth, java.scripting, jdk.unsupported, java.datatransfer, jdk.unsupported.desktop, jdk.jsobject, jdk.xml.dom]
Running: C:\Program Files\Java\jdk-11.0.1\bin\javac
.
.
module-info.java:34: error: package javax.media.jai does not exist
uses javax.media.jai.OperationRegistrySpi;
^
1 error
 

fhersof

Member
Where does javax.media.jai come from?

when I add this library the error occurs, but I check the dependencies and they are fine:

B4X:
    <version>1.01</version>
    <author>Juan Marrero</author>
    <dependsOn>CrystalReportsRuntime</dependsOn>
    <dependsOn>com.azalea.ufl.barcode.1.0</dependsOn>
    <dependsOn>commons-collections-3.1</dependsOn>
    <dependsOn>commons-configuration-1.2</dependsOn>
    <dependsOn>commons-lang-2.1</dependsOn>
    <dependsOn>commons-logging</dependsOn>
    <dependsOn>cvom</dependsOn>
    <dependsOn>itextpdf-5.5.0</dependsOn>
    <dependsOn>icu4j</dependsOn>
    <dependsOn>jai_imageio</dependsOn>
    <dependsOn>JDBInterface</dependsOn>
    <dependsOn>jrcerom</dependsOn>
    <dependsOn>keycodeDecoder</dependsOn>
    <dependsOn>log4j</dependsOn>
    <dependsOn>logging</dependsOn>
    <dependsOn>pfjgraphics</dependsOn>
    <dependsOn>QueryBuilder</dependsOn>
    <dependsOn>webreporting</dependsOn>
    <dependsOn>webreporting-jsf</dependsOn>
    <dependsOn>XMLConnector</dependsOn>
    <dependsOn>xpp3</dependsOn>
    <dependsOn>jtds-1.3.1</dependsOn>
    <dependsOn>mysql-connector-java-5.1.40-bin</dependsOn>
    <dependsOn>ojdbc7</dependsOn>
    <dependsOn>sqlite-jdbc-3.23.1</dependsOn>
    <dependsOn>mssql-jdbc-7.0.0.jre8</dependsOn>
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The problem is that this library depends on many old libraries that are not compatible with the relatively new module system.

I was able to build a package but I cannot say whether it really works.

You will need to:
1. Open jai_imageio.jar and delete META-INF\javax.media.jai.OperationRegistrySpi
2. Delete the enum folder: commons-lang-2.1.jar\org\apache\commons\lang\enum
3. Delete javax folder from xpp3.jar.
 
Upvote 0

fhersof

Member

Hello Erel, excellent definition, I will do what you tell me. You could share the package you created. Really, thank you so much.
 
Upvote 0

fhersof

Member

I did what was indicated and I compiled but unfortunately it did not work, in the end the solution was to use the B4JPackager 1.50 and everything was perfect. Thank you very much for the help and God bless you
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…