import java.io.*;
import java.sql.*;
public class check
{
public static void main (String[] args)
try
{
//String hi="com.mysql.jdbc.Driver";
Class.forName("com.mysql.jdbc.Driver");
System.out.println("class loaded");
String oracleurl= "jdbc:mysql://localhost:3306/check";
String username= "root";
String password= "vihu";
Connection conn = DriverManager.getConnection(oracleurl,username,password);
Statement s = conn.createStatement();
String query="create table login(username1 varchar(20),password1 varchar (25))";
s.executeUpdate(query);
System.out.println("Connection1 Established ");
s.close();
conn.close();
}
catch(Exception e)
{
System.out.println(e.toString());
}
}
}
in this code i got error of "classNotFoundException:com.mysql.jdbc.driver" though i had mysql connector but when i run same type of code this error i didnt get kindly help me thanks in advance ..!!