I'M NOT ASKING ABOUT THE CODE. I just want to know what are and all the steps involved in the connection other than coding. I'm using j2sdk1.4.0 and MySQL Server 4.1. Am very new to this area.
Thanks in advance
I'M NOT ASKING ABOUT THE CODE. I just want to know what are and all the steps involved in the connection other than coding. I'm using j2sdk1.4.0 and MySQL Server 4.1. Am very new to this area.
Thanks in advance
Hi, I maybe my advice will not be as useful as that from Vinegar, but to keep it simple you can always do it like this:
Now when you need to run your app do something like this on the command line:
java -classpath .:“/someplace in your computer/mysql-connector-java.jar” your app
I hope this can help you get started. Good luck!
Im sorry Vinegar and Wallyqs both the answers doesn't help me. Actually am using mysql-connector-java-3.0.17-ga and I can understand the problem is with the connection. When I try to execute my program it throws an error NoClassFoundException: com.mysql.jdbc.Driver.
If your code cannot find the class, then that's always going to be an issue with your classpath (and this isn't specific to JDBC in any way). Make sure you have the MySQL JDBC JAR on your classpath at runtime (it's probably called mysql-connector-java-3.0.17-ga.jar
; if you have an IDE, it can probably tell you where the class in question lives).