Java – add jdbc driver to classpath
OK, I set up my Maven correctly on win vista_ HOME,JAVA_ HOME. But I don't have a course path yet I also installed mysql Now I have opened a hibernate book. On the first page, it says "make sure the jdbc driver is in your classpath" I also downloaded some zipj files, which are connectorj or some names. It is basically the MySQL driver of Java... But my problem now is this sentence. I don't know what to do: "make sure the jdbc driver is in your classpath“
thank you
Solution
This is a good tutorial on setting the class path You can also read managing the Java classpath (Windows)
Having said that, you should not set Classpaths for drivers in Windows environment variables Instead, you should include the driver jar in the IDE under the project properties But I noticed you were actually using Maven In this case, you should look for the driver under Maven to implement the dependency Maven will download the driver jar and set it locally if it does not exist
If you don't use any IDE, you can create a lib directory and tell the compiler that all necessary jars are there when compiling / executing You can find how in the previous link given above