Hi,
I have some problems using jHttpUtils2 library with Non-UI application (console application).
I try it with curl example:
It compiles fine , but when I run it I get errors like this:
httpjob._download (java line: 93)
java.lang.NoClassDefFoundError: javafx/application/Platform
at anywheresoftware.b4j.objects.FxBA.postRunnable(FxBA.java:17)
at anywheresoftware.b4a.keywords.Common.CallSubDelayed4(Common.java:465)
at anywheresoftware.b4a.keywords.Common.CallSubDelayed2(Common.java:455)
at b4j.example.httpjob._download(httpjob.java:93)
at b4j.example.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 b4j.example.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
I have some problems using jHttpUtils2 library with Non-UI application (console application).
I try it with curl example:
B4X:
'Non-UI application (console application)
#Region Project Attributes
#CommandLineArgs: http://www.b4x.com
#End Region
Sub Process_Globals
End Sub
Sub AppStart (Args() As String)
If Args.Length = 0 Then
Log("URL is missing.")
ExitApplication2(1)
End If
Dim j As HttpJob
j.Initialize("j", Me)
j.Download(Args(0))
StartMessageLoop
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success Then
Log(Job.GetString)
Else
Log(Job.ErrorMessage)
End If
Job.Release
ExitApplication2(0)
End Sub
httpjob._download (java line: 93)
java.lang.NoClassDefFoundError: javafx/application/Platform
at anywheresoftware.b4j.objects.FxBA.postRunnable(FxBA.java:17)
at anywheresoftware.b4a.keywords.Common.CallSubDelayed4(Common.java:465)
at anywheresoftware.b4a.keywords.Common.CallSubDelayed2(Common.java:455)
at b4j.example.httpjob._download(httpjob.java:93)
at b4j.example.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 b4j.example.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
Last edited: