Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Using JavaFX Application in DreamBot Script


    badramen

    Recommended Posts

    I'm trying to write a script which launches a JavaFX application (instead of Swing - for many reasons). I've coded the JavaFX app (not looking for basic syntax help here...), and it launches standalone perfectly fine. I'm trying to launch it at the beginning of my script so I'm using the below in order to launch it, but nothing is being launched:

    new Thread(() -> Application.launch(SettingsPanelFX.class)).start();

    Before you ask I'm launching it on a separate thread so that the GUI is able to be used while the bot is still being run (to adjust parameters on the fly, partly for debugging purposes but also so that the user never needs to re-launch the script and adjust specific settings such as potion quantities).

    Anyway, just trying to "get it running" I've called the below in order to get the GUI to launch but it still doesn't work

    Application.launch(SettingsPanelFX.class);

    I'm not entirely sure what the issue could be. 

    image.png.ac6fe1b12dcec99994674c5f247d0ce8.png

    I suspect that this might have something to do with the way that DreamBot scripts get built?

     

    Edited by badramen
    Link to comment
    Share on other sites

    I had this same issue prior to launching my first script. I would launch one instance fine, though the thread would not terminate properly on script end causing issues when starting back up.

    Call me crazy, but what’s wrong with swing? There’s lots of nice libraries to make it look good, and good implementations within IntelliJ and other IDEs

    Link to comment
    Share on other sites

    14 hours ago, badramen said:

    I'm trying to write a script which launches a JavaFX application (instead of Swing - for many reasons). I've coded the JavaFX app (not looking for basic syntax help here...), and it launches standalone perfectly fine. I'm trying to launch it at the beginning of my script so I'm using the below in order to launch it, but nothing is being launched:

    new Thread(() -> Application.launch(SettingsPanelFX.class)).start();

    Before you ask I'm launching it on a separate thread so that the GUI is able to be used while the bot is still being run (to adjust parameters on the fly, partly for debugging purposes but also so that the user never needs to re-launch the script and adjust specific settings such as potion quantities).

    Anyway, just trying to "get it running" I've called the below in order to get the GUI to launch but it still doesn't work

    Application.launch(SettingsPanelFX.class);

    I'm not entirely sure what the issue could be. 

    image.png.ac6fe1b12dcec99994674c5f247d0ce8.png

    I suspect that this might have something to do with the way that DreamBot scripts get built?

     

    It can't load your javaFX class, I don't have an answer exactly how to fix it but I ran into the same problem trying to load an external library into a different API and got the same error.

    Link to comment
    Share on other sites

    It looks like the JVM you're using doesn't include JavaFX (which is why we don't allow JavaFX on the SDN). JavaFX isn't usually included in most Java installations anymore.

    Link to comment
    Share on other sites

    • 2 weeks later...

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.