B4J Question Runtime crash

ivanomonti

Expert
Licensed User
Longtime User
I'm trying to compile the package but when I compile everything is ok but when I launch my app it closes immediately,
I attach the compilation message. I installed everything new, latest version of b4J and java, which maybe is not correct



B4X:
B4JPackager11 Version 1.40
Exe name: Maye.exe
build folder: C:\Users\MONTII~1\Desktop\myvku-09\Objects\temp\build
InputJar: C:\Users\MontiIvanoAngelo\Desktop\myvku-09\Objects\Maye.jar
Running: C:\Users\MONTII~1\Desktop\myvku-09\Objects\temp\FindDosPath.exe
Running: C:\Java\jdk-14.0.1\bin\jar
Package name: maye.miasmart
Running: C:\Java\jdk-14.0.1\bin\jdeps
.
.
.
Explicitly excluded modules: [javafx.web]
Included modules: [jdk.charsets, jdk.crypto.ec, java.base, java.desktop, java.instrument, java.logging, java.management, java.management.rmi, java.naming, java.rmi, java.security.jgss, java.sql, java.xml, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing]
Running: C:\Java\jdk-14.0.1\bin\javac
.
Running: C:\Java\jdk-14.0.1\bin\jar
.
Running: C:\Java\jdk-14.0.1\bin\jlink
.
.
.
.
.
.
.
.
.
.
.
Running: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe
Running: explorer.exe
Done!
 

stevel05

Expert
Licensed User
Longtime User
Run it using the run_debug.bat that is in the build directory. Just double click on it and there should be a useful error message in the dosbox window.
 
Upvote 0

ivanomonti

Expert
Licensed User
Longtime User
Run it using the run_debug.bat that is in the build directory. Just double click on it and there should be a useful error message in the dosbox window.
B4X:
C:\Users\MontiIvanoAngelo\Desktop\myvku-09\Objects\temp\build>cd bin

C:\Users\MontiIvanoAngelo\Desktop\myvku-09\Objects\temp\build\bin>java.exe @release_java_modules.txt  -m b4j/maye.miasmart.main
b4xmainpage.innerInitialize (java line: -1)
java.lang.RuntimeException: java.lang.NoClassDefFoundError: javafx/scene/web/WebView
        at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source)
        at b4j/maye.miasmart.b4xmainpage.innerInitialize(Unknown Source)
        at b4j/maye.miasmart.b4xmainpage._initialize(Unknown Source)
        at b4j/maye.miasmart.b4xpagesmanager._initialize(Unknown Source)
        at b4j/maye.miasmart.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/maye.miasmart.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(Unknown Source)
        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.NoClassDefFoundError: javafx/scene/web/WebView
        at b4j/anywheresoftware.b4j.objects.WebViewWrapper.<clinit>(Unknown Source)
        at b4j/maye.miasmart.b4xmainpage._class_globals(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)
        ... 21 more
Caused by: java.lang.ClassNotFoundException: javafx.scene.web.WebView
        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)
        ... 27 more
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Add #PackagerProperty: IncludedModules = javafx.web to your project, or append , javafx.web if you already have that line.
 
Upvote 1
Top