B4J Question error in compiling

bahonar19

New Member
hi !
every time , when i want to run the project , i have these errors :

B4X:
Waiting for debugger to connect...
java.lang.NoClassDefFoundError: javafx/scene/control/Dialog
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:195)
    at anywheresoftware.b4a.shell.Shell.getCorrectClassName(Shell.java:504)
    at anywheresoftware.b4a.shell.Shell.createObject(Shell.java:491)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:244)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90)
    at b4j.example.main.<clinit>(main.java:17)
Caused by: java.lang.ClassNotFoundException: javafx.scene.control.Dialog
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 13 more
java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javafx/scene/control/Dialog
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90)
    at b4j.example.main.<clinit>(main.java:17)
Caused by: java.lang.NoClassDefFoundError: javafx/scene/control/Dialog
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:195)
    at anywheresoftware.b4a.shell.Shell.getCorrectClassName(Shell.java:504)
    at anywheresoftware.b4a.shell.Shell.createObject(Shell.java:491)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:244)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    ... 2 more
Caused by: java.lang.ClassNotFoundException: javafx.scene.control.Dialog
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 13 more
Exception in thread "main"

what to do ?
 

bahonar19

New Member
I installed sun.java.8.0.102.x64 & JDK.8.0.102.x64 and i setted it into configure paths , but it was error :
B4X:
Waiting for debugger to connect...
Program started.
Error occurred on line: 15 (Main)
java.lang.IllegalStateException: Cannot set modality for the primary stage
    at javafx.stage.Stage.initModality(Stage.java:529)
    at anywheresoftware.b4j.objects.Form.ShowAndWait(Form.java:214)
    at b4j.example.main._appstart(main.java:75)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:612)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:229)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.start(main.java:36)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
    at java.lang.Thread.run(Thread.java:745)

What to do ?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…