Ive been following the instructions here but been facing issues.
When i make the bat file as instructed like this
"C:\Program Files\Java\jre1.8.0_172\bin\java.exe" -cp "lib/*" org.osbot.Boot -debug
i get an error "Could not find or load main class org.osbot.Boot"
I can get the client open the usual way i do with adding ....bin \javaw.exe" -jar "OSbot 2.5.8.jar" but idk if the problem is this or what ?
When i have the client open and logged in i run the script i copied and only changed the db/locations i had to for getting into correct path in the sql. After running the script nothing happens and the client just kind of freezes. Anyone kind enough to help me out? Ive been struggling with this database setup shit for days now
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.*;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
@ScriptManifest(author = "", info = "", logo = "", name = "SQL Test", version = 0)
public class Sqltest extends Script {
@Override
public void onStart() throws InterruptedException {
try {
String host = "localhost:3306";
String db = "mule";
String user = "root";
String pass = "";
String connStr = String.format("jdbc:mysql://%s/%s?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC", host, db);
Connection conn = DriverManager.getConnection(connStr, user, pass);
ResultSet results = conn.createStatement().executeQuery("SELECT `name` FROM `mule`;");
while (results.next()) {
logger.debug(results.getString("name"));
}
} catch (SQLException e) {
logger.error(e);
}
}
@Override
public int onLoop() throws InterruptedException {
return 50;
}
}