how to install mysqlconnecter java correctly?

会有一股神秘感。 提交于 2019-12-06 08:16:44

The JDBC driver does not need any "installation".

You should not set the system wide CLASSPATH environment variable, that only leads to confusion.

When starting your program, simply provide the location of the file to the Java command:

java -cp myapp.jar;D:\classpath\mysql-connector-java-5.1.22-bin.jar MyMain

To use it inside your NetBeans project, add the jar file in the "Libraries" section of your project.

Just add *D:\classpath* to the CLASSPTH using set command (set CLASSPATH=%CLASSPATH%;D:\classpath;) on the command prompt or by defining a CLASSPATH environment variable using UI.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!