B4J Library ControlsFX Library

Discussion in 'B4J Libraries & Classes' started by Erel, Feb 15, 2015.

  1. koaunglay

    koaunglay Member Licensed User

    Thanks jmon! Now it's ok! I've installed Java 8. Thanks! Thanks a lot.
     
    jmon likes this.
  2. Giorgos_xou

    Giorgos_xou Member

    project is being compiled and application closes automatically and i have an error
    [​IMG]



    but when i run the jar file runs
    [​IMG]
    Program started.
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sun/javafx/scene/traversal/ParentTraversalEngine
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:82)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.start(main.java:36)
    at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
    at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
    at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
    at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
    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.access$300(WinApplication.java:39)
    at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/scene/traversal/ParentTraversalEngine
    at org.controlsfx.control.ButtonBar.<init>(ButtonBar.java:412)
    at org.controlsfx.control.ButtonBar.<init>(ButtonBar.java:355)
    at org.controlsfx.control.action.ActionUtils.createButtonBar(ActionUtils.java:429)
    at impl.org.controlsfx.skin.NotificationBar.updatePane(NotificationBar.java:164)
    at impl.org.controlsfx.skin.NotificationBar.<init>(NotificationBar.java:160)
    at org.controlsfx.control.Notifications$NotificationPopupHandler$1.<init>(Notifications.java:332)
    at org.controlsfx.control.Notifications$NotificationPopupHandler.show(Notifications.java:332)
    at org.controlsfx.control.Notifications$NotificationPopupHandler.show(Notifications.java:317)
    at org.controlsfx.control.Notifications.show(Notifications.java:263)
    at org.controlsfx.control.Notifications.showInformation(Notifications.java:238)
    at anywheresoftware.b4j.objects.ControlsUtils.ShowNotification3(ControlsUtils.java:142)
    at b4j.example.main._loadrecords(main.java:206)
    at b4j.example.main._appstart(main.java:118)
    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:483)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:563)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:224)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:156)
    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:483)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    ... 14 more
    Caused by: java.lang.ClassNotFoundException: com.sun.javafx.scene.traversal.ParentTraversalEngine
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 39 more


    help please
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Are you using Java 8?
     
  4. Giorgos_xou

    Giorgos_xou Member

    yes
    [​IMG]
     
  5. jmon

    jmon Well-Known Member Licensed User

    did you set the path to the SDK correctly in B4J?
     
  6. Giorgos_xou

    Giorgos_xou Member

    i think so ... i can compile without any problem any other project even if i have jControlsFX library Checked on IDE....
     
  7. jmon

    jmon Well-Known Member Licensed User

    I mean did you point it correctly to
    ?
    you need java 8u20 minimum.
     
  8. Giorgos_xou

    Giorgos_xou Member

    i had jdk1.8.0_05 i download right now the jdk1.8.0_51 version
    ... and yes it works :D Thanks you
     
    Last edited: Jul 19, 2015
    jmon likes this.
  9. ivan.tellez

    ivan.tellez Active Member Licensed User

    @Erel

    It would be amazing if you add support for ControlsFX in the internal designer :D
     
  10. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi,

    compiled the example using Java 1.8.0_66 and received error when calling

    Code:
    Sub AppStart (Form1 As Form, Args() As String)
        cutils.DisableCssWarnings
        warningDecoration = fx.LoadImage(
    File.DirAssets, "exclamation.png")
    Code:
    main._appstart (java line: 60)
    java.lang.NoClassDefFoundError: com/sun/javafx/Logging
    Seems a change in the API. Any hint how to resolve?
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    For now remove this method and it should work.
     
  12. rwblinn

    rwblinn Well-Known Member Licensed User

    Removed - the UI comes up, but when using f.e. the RangeSlider Control or the NotificationButton, following error:

    Code:
    java.lang.NoClassDefFoundError: com/sun/javafx/Utils
    Looked the ControlsFX site and downloaded based on info: For users of JavaFX 8u40 and greater, download ControlsFX 8.40.10.

    BUT it did not resolve the problem.

    BTW: When using the latest RemoteControl example, which also uses ControlsFX same errors.
     
  13. Erel

    Erel Administrator Staff Member Licensed User

    Have you copied controlsfx-8.jar to the internal libraries folder?
     
  14. rwblinn

    rwblinn Well-Known Member Licensed User

    Yes = copied controlsfx-8.40.10.jar and renamed to controlsfx-8.jar --- basically replacing the previous controlsfx-8.jar version 8.20.8.
     
  15. Erel

    Erel Administrator Staff Member Licensed User

    Make sure that you copied it to the internal libraries folder rather than the additional libraries folder.
     
  16. rwblinn

    rwblinn Well-Known Member Licensed User

    Oops = Overlooked that controlsfx is part of the standard B4J libraries (... there are so many B4J libs - sometimes confused which are core and which are additional).
    Moved over and working fine now - expect the disablecsswarning.

    Thanks for your help - appreciated.
     
    Last edited: Dec 6, 2015
    Erel likes this.
  17. Erel

    Erel Administrator Staff Member Licensed User

    I've updated / removed the installation instructions from the first post as they are no longer required.
     
    rwblinn likes this.
  18. jmon

    jmon Well-Known Member Licensed User

    I just wanted to say that for users that used ControlFx since java 8u20, updating should be done this way:

    1. Install the latest B4J
    2. Install the latest java 8 JDK (8u66)
    3. Delete the old "controlsfx-8.jar", "jControlsFX.jar", jControlsFX.xml" from your additional libraries folder
    4. Download http://fxexperience.com/downloads/controlsfx-8.40.10.zip, rename "controlsfx-8.40.10.jar" to "controlsfx-8.jar" and copy it to your internal libraries folder (in program files), overwriting the one that came with B4J.

    That works for me.
     
    inakigarm likes this.
  19. DonManfred

    DonManfred Expert Licensed User

    I tried to recompile the library. I added the source to eclipse and look out for errors.

    With one import i stuck:
    Code:
    import com.sun.javafx.Logging;
    which jar do i need to reference to get this import work?

    My actual trying are

    [​IMG]
     
  20. Erel

    Erel Administrator Staff Member Licensed User

    Just remove it and leave DisableCssWarnings empty. It is no longer required.
     
    DonManfred likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice