completely new to this part, and took the code with only slight changed from a book so ..
heres what i have
private static Connection getConection(){ Connection conect = null; try { Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost/players"; String user = "root"; String pw = "********"; conect = DriverManager.getConnection(url, user, pw); }catch(ClassNotFoundException e){ System.out.println("Class not Found: " + e.getMessage()); System.exit(0); }catch(SQLException e){ System.out.println("SQL Error: " + e.getMessage()); System.exit(0); } return conect; }
and i get "Class not Found: com.mysql.jdbc.Driver" when i run it . why doesn't it work ?
notes:
i just installed the mysql java connection
and installed some kind of java database that i though i needed XP
[ >.< it was an eclipse problem XP , i didnt load the jar file to there thinking it wold just recognize it *fails* ]