The client is offline due to RuneScape update. You may see instance errors but this is due to the update and not actual instance errors. This should be resolved soon. Join our Discord for more information.

Java question



  • I wrote a bot for agility that works fine and compiles.

    Today I created a new project for combat and my agility script disappeared. When I go to recompile the script, I just get an error saying my 'package Agility.data does not exist', however I have made no changes to the code since it worked.

    I'm guessing adding a new project messed this up somehow, but I have no idea as I'm not an expert in Java. Any suggestions?



  • Do your scripts have any overlapping class names? If so are you building your scripts into a jar file or just compiling to .class files?



  • @Iain-Mahoney There weren't any overlapping classes that I was aware of.

    I resolved the issue by shutting down Intellij completely, reopening just the agility script, and it compiled fine. No changes to the code at all.

    I believe I'm just compiling to a .class file - whatever Build project does, as laid out in the tutorials.

    I apologize for the noobiness!



  • Sometimes if you have overlapping class names, the files can cause confusion. It's good practice atleast to put your class files within a package. Just click the src folder in IntelliJ and add new Package. Put your java files within that and it should prevent any future project overlap.


 

45
Online

13.4k
Users

1.2k
Topics

17.1k
Posts