I'm setting up a SQL connector for my bukkit plugin, but whenever I compile into a jar file and try running from the server I get
java.sql.SQLEXCEPTION: No suitable driver found.
I have tried adding in the line
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Whenever I put that I get
SQLEXCEPTION: com.microsoft.sqlserver.jdbc.SQLServerDriver
This problem only occurs when I put it into a jar file and not when I test it in my IDE.
I currently use Intellij.
This is my current Jar setup: https://gyazo.com/94341b7bb47121a0416deaee6279dd30
public ConnectionUtils(String url, String us, String pa) throws SQLException
{
SQLServerDriver dr = new SQLServerDriver();
user = us;
pass = pa;
con = DriverManager.getConnection(url, us, pa);
isConnected = true;
this.url = url;
}