I already saw many post where people were trying to add the driver. I'm using intelij as IDE and added the driver under Modules => Dependencies => Add Jar; So my IDE identified the driver and can show me the source file of it. My problem is, as soon i start my server I'll get that error that he couldn't find the driver:
My Code:
private void createDB()
{
try {
Class.forName("com.mysql.jdbc.Driver");
database = DriverManager.getConnection("jdbc:mysql://***:" + 3307 + "/**db", "", "");
} catch (Exception e) {
e.printStackTrace();
}
}
My exception:
> java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader.findClass(Unknown Source)