I have added the mysql-connector-java-5.1.19.jar but i don't know why the error is coming. driver is imported as shown in the image
public class data {
String server = "jdbc:mysql://localhost/";
String user = "root";
String pass = "toor";
public int starting() {
int id;
try {
Class.forName("com.mysql.jdbc.driver");
Connection incre = (Connection) DriverManager.getConnection("inc"+server, user, pass);
Statement statement = (Statement) incre.createStatement();
String select = "Select start from incr;";
ResultSet rs = (ResultSet) statement.executeQuery(select);
if(rs.next()){
id = rs.getInt("start");
}
incre.close();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
driver
should beDriver