B4J Question Class not found exception

wl

Well-Known Member
Licensed User
Longtime User
Hi,

I installed B4J correctly (I think) and created the application as demo'ed in http://www.b4x.com/android/forum/threads/non-ui-applications.34657/.

When I run the application I get the following. What am I missing ?

Thanks !

B4X:
main._appstart (java line: 51)
java.lang.NoClassDefFoundError: javafx/application/Platform
    at anywheresoftware.b4j.objects.FxBA.postRunnable(FxBA.java:17)
    at anywheresoftware.b4a.keywords.Common.CallSubDelayed4(Common.java:457)
    at anywheresoftware.b4a.keywords.Common.CallSubDelayed2(Common.java:447)
    at b4j.example.httpjob._download(httpjob.java:75)
    at curl.jar.main._appstart(main.java:51)
    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.BA.raiseEvent(BA.java:84)
    at curl.jar.main.main(main.java:26)
Caused by: java.lang.ClassNotFoundException: javafx.application.Platform
    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)
    ... 12 more
 

wl

Well-Known Member
Licensed User
Longtime User
OK, I found it ... I added the source files (as in the ZIP file) and now it works ...

In Windows it works perfectly
BUT: when running in Linux (Ubuntu) the java -cp curl.jar ... call does not return anything.

I tried all kinds of URL's (including http://www.google.com): only URL's which return very few characters eem to work. As soon as the output is a few Kb's long the call does not return anything (waits for the output to end ?)
 
Upvote 0
Top