tufanv Expert Licensed User Longtime User Mar 5, 2018 #1 Hello, In one of my projects this works fine : Code: Copy Sub SetAutoComplete(Items As List, Field As TextField) Dim jo As JavaObject jo.InitializeStatic("org.controlsfx.control.textfield.TextFields") jo.RunMethod("bindAutoCompletion", Array(Field, Items)) End Sub Code: Copy SetAutoComplete(listbittrex,txtcoin) in another project with the same code i keep getting the error for the line Code: Copy jo.InitializeStatic("org.controlsfx.control.textfield.TextFields") Code: Copy Error occurred on line: 83 (Main) java.lang.ClassNotFoundException: org.controlsfx$control$textfield$TextFields at anywheresoftware.b4j.object.JavaObject.getCorrectClassName(JavaObject.java:288) at anywheresoftware.b4j.object.JavaObject.InitializeStatic(JavaObject.java:74) at b4j.example.main._setautocomplete(main.java:245) at b4j.example.main._jobdone(main.java:219) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93) at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:482) at anywheresoftware.b4a.keywords.Common.access$0(Common.java:462) at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:536) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418) at java.base/java.security.AccessController.doPrivileged(Native Method) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175) at java.base/java.lang.Thread.run(Thread.java:844) Am I missing stg ? little project attached for testing Last edited: Mar 5, 2018
Hello, In one of my projects this works fine : Code: Copy Sub SetAutoComplete(Items As List, Field As TextField) Dim jo As JavaObject jo.InitializeStatic("org.controlsfx.control.textfield.TextFields") jo.RunMethod("bindAutoCompletion", Array(Field, Items)) End Sub Code: Copy SetAutoComplete(listbittrex,txtcoin) in another project with the same code i keep getting the error for the line Code: Copy jo.InitializeStatic("org.controlsfx.control.textfield.TextFields") Code: Copy Error occurred on line: 83 (Main) java.lang.ClassNotFoundException: org.controlsfx$control$textfield$TextFields at anywheresoftware.b4j.object.JavaObject.getCorrectClassName(JavaObject.java:288) at anywheresoftware.b4j.object.JavaObject.InitializeStatic(JavaObject.java:74) at b4j.example.main._setautocomplete(main.java:245) at b4j.example.main._jobdone(main.java:219) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93) at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:482) at anywheresoftware.b4a.keywords.Common.access$0(Common.java:462) at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:536) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418) at java.base/java.security.AccessController.doPrivileged(Native Method) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175) at java.base/java.lang.Thread.run(Thread.java:844) Am I missing stg ? little project attached for testing
tufanv Expert Licensed User Longtime User Mar 5, 2018 #2 little project attached for testing Attachments asa.zip asa.zip 69.4 KB · Views: 534 Upvote 0
DonManfred Expert Licensed User Longtime User Mar 5, 2018 #3 tufanv said: Am I missing stg ? Click to expand... an #additionaljar line maybe? Upvote 0
tufanv Expert Licensed User Longtime User Mar 5, 2018 #4 DonManfred said: an #additionaljar line maybe? Click to expand... in the other project which is working , I have only Code: Copy #AdditionalJar: bcprov-jdk15on-159 #AdditionalJar: sqlite-jdbc-3.7.2 but I dont think they are related. I also tedted with these. Upvote 0
DonManfred said: an #additionaljar line maybe? Click to expand... in the other project which is working , I have only Code: Copy #AdditionalJar: bcprov-jdk15on-159 #AdditionalJar: sqlite-jdbc-3.7.2 but I dont think they are related. I also tedted with these.
Daestrum Expert Licensed User Longtime User Mar 5, 2018 #5 Have you tried adding jControlsFX library, without it I get the same error as you. Upvote 0
tufanv Expert Licensed User Longtime User Mar 5, 2018 #6 Daestrum said: Have you tried adding jControlsFX library, without it I get the same error as you. Click to expand... Yes ! this fixes the problem. By chance , my other project had that enabled. Thank you ! Upvote 0
Daestrum said: Have you tried adding jControlsFX library, without it I get the same error as you. Click to expand... Yes ! this fixes the problem. By chance , my other project had that enabled. Thank you !
tufanv Expert Licensed User Longtime User Mar 5, 2018 #7 DonManfred said: You really should do more debugging when you have such an error. For me it looks more like you are waisting our time because you are too lazy to search for the problem Click to expand... Can you help me learn how could i do more debugging on this as I tried some hours trying to figure out the problem without posting here , I also checked my previous projects. I would be very happy if i can learn how could I do it better so next time I can figure the problem myself ? Upvote 0
DonManfred said: You really should do more debugging when you have such an error. For me it looks more like you are waisting our time because you are too lazy to search for the problem Click to expand... Can you help me learn how could i do more debugging on this as I tried some hours trying to figure out the problem without posting here , I also checked my previous projects. I would be very happy if i can learn how could I do it better so next time I can figure the problem myself ?
R Roycefer Well-Known Member Licensed User Longtime User Mar 5, 2018 #8 This line in your stack trace is the clue to the problem: Code: Copy java.lang.ClassNotFoundException: org.controlsfx$control$textfield$TextFields Most clues will be found in your stack trace. In this case, the JVM can't find a class (ClassNotFoundException) and we know the package that contains the missing class (org.controlsfx...) so we can infer that the jControlsFX library is missing. Upvote 0
This line in your stack trace is the clue to the problem: Code: Copy java.lang.ClassNotFoundException: org.controlsfx$control$textfield$TextFields Most clues will be found in your stack trace. In this case, the JVM can't find a class (ClassNotFoundException) and we know the package that contains the missing class (org.controlsfx...) so we can infer that the jControlsFX library is missing.