qwazer :
You cannot connect to database with JDBC without using driver.\n\nCheck tutoral \nhttp://docs.oracle.com/javase/tutorial/jdbc/basics/gettingstarted.html#step3",
2014-03-08T06:19:02
user3395335 :
The MYSQL driver must reside on the classpath of the Java application that accesses the MySQL database.\nIf the java application running on the client directly accesses MySQL, then yes, each user must have the jar.\n\nOne way to avoid this is to place the code that interacts with your database on a server, then have the client application make remote calls to that serer application. ",
2014-03-08T06:19:59
Vladimir G. :
If I understand the question correctly your application is under development now and will be later distributed to many users. So there are a few options you could use: \n\n\nExplode mysql-connector.jar and pack it with your other classes in a single jar. See Maven Assembly plugin \nYou could also distribute your program using two JAR files, one with your code compiled and the other is mysql-connector.jar. Add a .bat or .sh script that will launch your app and add mysql-connector.jar to the classpath.\n\n\nHaving said the above I believe you might want to expose the data using web services. Allowing your users to access your database directly could lead to lots of issues - security, scalability, etc.",
2014-03-08T06:53:47