OSBot has a Script method called getScriptResourceAsStream; its purpose is to write code once no matter if the script is in a jar, zip, class files, local, or on the SDN. Namely, this topic will show you how to set up your packaging for compatibility between local and SDN resource loading.
Since the SDN requires a specific package structure, your local project will need to be the same. The format is:
ModuleName/src,resources/files
For instance:
MacroSlayer/src/Main.java
MacroSlayer/resources/image.png
For instance, this is what it should look like:
Now the InputStream returned from getScriptResourceAsStream should be of the following format:
getScriptResourceAsStream("resources/image.png")
For instance, this user's script has this code which works both locally and on the SDN:
Using this method will simplify your development process when using resources.