Good morning everyone. I am having trouble connecting my MySQL database to a JTable in Eclipse. I keep on getting an exception and receiving this message "Unable to find and load database driver". Here is a sample of database code for the program:
I omitted the username and password in this sample code for security purposes. I have also included the MySQL driver .jar file into the WEB/Inf folder and I still cannot connect the database into the JTable. Could anyone give me any suggestions to resolve this issue? I am using Eclipse 3.3 Java EE platform.
and I still cannot connect the database into the JTable.
First this: is it a web app (because you vaguely said something about WEB/Inf) or a desktop app (that´s where JTable is for) or an applet or JNLP application embedded in a page of the web app? This is important to know, because the default classpath locations differs in each of those environments.