I am trying to use the builtin packager. But I cannot get it to work properly.
I am using the latest version of B4j
I have downloaded the version of Java 11.0.1.
In Main I have -
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
The output is:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Reading through some of the posts on the forum, it looks like my included modules is not complete. I tried to adding
which allowed it to compile but then the completed jar filecrashes with:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Any idea what I am doing wrong?
			
			I am using the latest version of B4j
I have downloaded the version of Java 11.0.1.
In Main I have -
			
				B4X:
			
		
		
		#AdditionalJar: sqlite-jdbc-3.7.2
#AdditionalJar: bcprov-jdk15on-161
#AdditionalJar: pdfbox-app-2.0.24.jar
#region Packager settings
'https://www.b4x.com/android/forum/threads/solved-b4jpackager11-error-javax-net-ssl-sslhandshakeexception.106141/
#PackagerProperty: IncludedModules = jdk.crypto.ec
'#PackagerProperty: IncludedModules = java.desktop
#PackagerProperty: IconFile = ../../SharedImages/appicon.ico
#PackagerProperty: ExeName = BCG Oral Health
#PackagerProperty: IncludedModules = javafx.web
#CustomBuildAction:  After Packager, %WINDIR%\System32\robocopy.exe, /MIR temp\build\ ../../PackagedOutput
#end region
#CustomBuildAction: 1, C:\Program Files\Java\jdk1.8.0_191\bin\java.exe, -jar C:\B4XBUILDS\compiletime.jarThe output is:
			
				B4X:
			
		
		
		B4JPackager11 Version 1.40
Exe name: BCG Oral Health.exe
build folder: E:\Development\AppSales\Bedfordshirecaregroup\bcgoralhealth\b4x\B4J\Objects\temp\build
InputJar: E:\Development\AppSales\Bedfordshirecaregroup\bcgoralhealth\b4x\B4J\Objects\b4x.jar
Running: E:\Development\AppSales\Bedfordshirecaregroup\bcgoralhealth\b4x\B4J\Objects\temp\FindDosPath.exe
Running: E:\Development\java\jdk-11.0.1\bin\jar
Package name: uk.co.digitwell.bcgoralhealth
Running: E:\Development\java\jdk-11.0.1\bin\jdeps
.
.
.
.
.
.
.
.
.
Explicitly excluded modules: [javafx.web]
Included modules: [jdk.crypto.ec, javafx.web, java.base]
Running: E:\Development\java\jdk-11.0.1\bin\javac
.
module-info.java:7: error: package javax.imageio.spi is not visible
uses javax.imageio.spi.ImageReaderSpi;
                  ^
  (package javax.imageio.spi is declared in module java.desktop, but module b4j does not read it)
1 errorReading through some of the posts on the forum, it looks like my included modules is not complete. I tried to adding
#PackagerProperty: IncludedModules = java.desktop
which allowed it to compile but then the completed jar filecrashes with:
			
				B4X:
			
		
		
		E:\Development\AppSales\Bedfordshirecaregroup\bcgoralhealth\b4x\PackagedOutput\bin>java.exe @release_java_modules.txt  -m b4j/uk.co.digitwell.bcgoralhealth.main
keyvaluestore._initialize (java line: -1)
java.lang.NoClassDefFoundError: java/sql/Driver
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
        at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
        at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Unknown Source)
        at b4j/anywheresoftware.b4j.objects.SQL.Initialize2(Unknown Source)
        at b4j/anywheresoftware.b4j.objects.SQL.Initialize(Unknown Source)
        at b4j/anywheresoftware.b4j.objects.SQL.InitializeSQLite(Unknown Source)
        at b4j/uk.co.digitwell.bcgoralhealth.keyvaluestore._initialize(Unknown Source)
        at b4j/uk.co.digitwell.bcgoralhealth.globals._createglobals(Unknown Source)
        at b4j/uk.co.digitwell.bcgoralhealth.b4xmainpage._initialize(Unknown Source)
        at b4j/uk.co.digitwell.bcgoralhealth.b4xpagesmanager._initialize(Unknown Source)
        at b4j/uk.co.digitwell.bcgoralhealth.main._appstart(Unknown Source)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source)
        at b4j/anywheresoftware.b4a.BA.raiseEvent(Unknown Source)
        at b4j/uk.co.digitwell.bcgoralhealth.main.start(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
        at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: java.sql.Driver
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        ... 36 moreAny idea what I am doing wrong?
 
				 
 
		 
 
		 
						
					 
 
		 
 
		 
 
		