I've been receiving this runtime error in netbeans. I even added the required jar file in Tools> Libraries but still recieving same error. I am lost. Please help me out.
Code:
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306//cart","student","student");
Statement st = con.createStatement();
ResultSet rs= st.executeQuery("select * from items");
rs.next();
String item =rs.getString("itemname");
System.out.println(item);
Code error:
Location of the jar file: