小弟的系统是win98,用的jbuilder4
为了连接到mysql,下载了mysql的驱动程序.
set classpath=path\to\xxx.jar
可是程序老是编译不能通过,提示找不到驱动程序。我该如何设置classpath,在jbuilder里面要设置吗?
为了连接到mysql,下载了mysql的驱动程序.
set classpath=path\to\xxx.jar
可是程序老是编译不能通过,提示找不到驱动程序。我该如何设置classpath,在jbuilder里面要设置吗?
里面add一个library,名字随便起,指定到jar的位置然后在你的project->properties里面required libary里面add刚才那个libary
把所包含JAR文件(mysql_driver.jar)的文件夹添加进该工程的Classpath即可
第一种方法:将com和org两个目录下所有文件和目录拷贝到任何地方,比如d:\mysqlforjdbc下
设置classpath=.;d:\mysqlforjdbc;%classpath%
Either copy the "com" and "org" subdirectories and all of their contents
to anywhere you like, and put the directory holding the "com" and "org"
subdirectories in your classpath, or...
第二种方法:将mysql-connector-java-3.0.7-stable-bin.jar拷贝到一个地方,如:d:\mysqlforjdbc下
设置classpath=.;d:\mysqlforjdbc\mysql-connector-java-3.0.7-stable-bin.jar;%classpath%
或直接把mysql-connector-java-3.0.7-stable-bin.jar拷贝到%JAVA_HOME%\jre\lib\ext下
%JAVA_HOME%就是J2SDK的安装目录,如我的为c:\j2sdk就拷贝到c:\j2sdk\jre\lib\ext下
如:c:\mysql\lib\mysql-lib.jar