ndsalem12 0 Share Posted January 21, 2020 Hi, so basically I am reaching out because I have recently tried connecting to mySQL database on my script. Even though I have added the mysql jar into the external libraries, I get an error saying that the jar isn't present when running on DreamBot. I know that it isn't my code because I have used the same code for a program that I have ran on eclipse. If anyone can help that would be great! Link to comment Share on other sites More sharing options...
ndsalem12 0 Author Share Posted January 21, 2020 Just now, ndsalem12 said: Hi, so basically I am reaching out because I have recently tried connecting to mySQL database on my script. Even though I have added the mysql jar into the external libraries, I get an error saying that the jar isn't present when running on DreamBot. I know that it isn't my code because I have used the same code for a program that I have ran on eclipse. If anyone can help that would be great! Also, not planning on posting the script to SDN, this is for private use. Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted January 22, 2020 Try compiling the SQL files within your scripts folder. Link to comment Share on other sites More sharing options...
Nuclear Nezz 2062 Share Posted January 22, 2020 You need to include a libs file in the root location of your jar, every jar you're using you need to put the name on a line, to avoid scripts loading 300 libs they don't need. Link to comment Share on other sites More sharing options...
ndsalem12 0 Author Share Posted January 23, 2020 10 hours ago, Nuclear Nezz said: You need to include a libs file in the root location of your jar, every jar you're using you need to put the name on a line, to avoid scripts loading 300 libs they don't need. Do you mind explaining how to do so? I am a fairly new scripter and this is one of my most ambitious projects using multiple external libraries. 17 hours ago, Pseudo said: Try compiling the SQL files within your scripts folder. Have absolutely no idea how to do that, my script is one file that contains everything such as connecting to the database and performing the actions of the script. If you could explain further I would appreciate it! Thanks for the response as well! Link to comment Share on other sites More sharing options...
Nuclear Nezz 2062 Share Posted January 23, 2020 32 minutes ago, ndsalem12 said: Do you mind explaining how to do so? I am a fairly new scripter and this is one of my most ambitious projects using multiple external libraries. Have absolutely no idea how to do that, my script is one file that contains everything such as connecting to the database and performing the actions of the script. If you could explain further I would appreciate it! Thanks for the response as well! Okay so you just need to make a file just under the src directory. You're gonna call it libs, this isn't a text file or anything, just a normal File, you can right click the src folder->new file, name it libs Then you put the names of the jars you're using in the libs folder, in your libs file. eg: json-simple-1.1.1.jar my-other-api.jar and that's it, rebuild it, if it's still not working open up your jar and make sure the file is there. As for the building into your script, that's an option in your IDE to build the source of a dependency into your output jar. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.