B4J Question Error building Standalone Package

Johan Schoeman

Expert
Licensed User
Longtime User
I need some help with the following error that I get when I try to build a standalone package from my B4J project (it runs fine when running it from the B4J IDE):

B4JPackager11 Version 1.40 Exe name: bfcSyspro.exe build folder: C:\Users\johans\DOCUME~1\B4JApps\CONNEC~1\CONNEC~1\Objects\temp\build InputJar: C:\Users\johans\Documents\B4JApps\connectSyspro\connectSyspro\Objects\connectSyspro.jar Running: C:\Users\johans\DOCUME~1\B4JApps\CONNEC~1\CONNEC~1\Objects\temp\FindDosPath.exe . . Running: C:\Java\jdk-11.0.1\jdk-11.0.1\bin\jar Package name: b4j.example Running: C:\Java\jdk-11.0.1\jdk-11.0.1\bin\jdeps . . Explicitly excluded modules: [javafx.web] Included modules: [jdk.charsets, java.base, javafx.base, javafx.graphics] Running: C:\Java\jdk-11.0.1\jdk-11.0.1\bin\javac . module-info.java:7: error: package java.sql is not visible uses java.sql.Driver; ^ (package java.sql is declared in module java.sql, but module b4j does not read it) 1 error:
B4JPackager11 Version 1.40
Exe name: bfcSyspro.exe
build folder: C:\Users\johans\DOCUME~1\B4JApps\CONNEC~1\CONNEC~1\Objects\temp\build
InputJar: C:\Users\johans\Documents\B4JApps\connectSyspro\connectSyspro\Objects\connectSyspro.jar
Running: C:\Users\johans\DOCUME~1\B4JApps\CONNEC~1\CONNEC~1\Objects\temp\FindDosPath.exe
.
.
Running: C:\Java\jdk-11.0.1\jdk-11.0.1\bin\jar
Package name: b4j.example
Running: C:\Java\jdk-11.0.1\jdk-11.0.1\bin\jdeps
.
.
Explicitly excluded modules: [javafx.web]
Included modules: [jdk.charsets, java.base, javafx.base, javafx.graphics]
Running: C:\Java\jdk-11.0.1\jdk-11.0.1\bin\javac
.
module-info.java:7: error: package java.sql is not visible
uses java.sql.Driver;
         ^
  (package java.sql is declared in module java.sql, but module b4j does not read it)
1 error

I am using inline java code in the B4J project and specifically the following imports to draw graphs with:
B4X:
import javafx.scene.chart.*;
import javafx.geometry.Side;
import javafx.scene.control.Label;
import javafx.event.EventHandler;
import javafx.scene.input.MouseEvent;
import javafx.scene.control.Label;
import javafx.scene.paint.Color;
import javafx.scene.text.Text;
import java.util.*;
import javafx.scene.*;
import javafx.scene.chart.XYChart.*;
import javafx.scene.chart.PieChart.Data;

import javafx.collections.FXCollections;          
import javafx.collections.ObservableList;

Have browsed the forum but don't find an answer to the error being raised.

I am using B4J V9.10 and Java 11

Seems like I am missing some PackagerProperty maybe....? Anyone that can help with a solution? Will be much appreciated.
 

Johan Schoeman

Expert
Licensed User
Longtime User
It seems that adding this additional Jar to my project is what is causing the error that I have reported in post #1 above:

B4X:
#AdditionalJar: javafx.controls


What should I do to be able to make use of it in my B4J project and then be able to build a standalone package?
 
Upvote 0
Top