[英]Unable to connect to database using JDBC driver (JTDS)
I'm in need to use a custom program that helps in database migration. 我需要使用有助于数据库迁移的自定义程序。 It needs to connect to
JTDS JDBC
driver. 它需要连接到
JTDS JDBC
驱动程序。 Unfortunately I receive an error 不幸的是我收到一个错误
java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
The program is a batch file and I have already downloaded the driver. 该程序是一个批处理文件,我已经下载了驱动程序。 Is there any specific location the path has to be added for the program to work?
为了使程序正常工作,是否需要添加路径?
您需要确保当批处理文件运行java命令时,您要在classpath参数上指定驱动程序的jar:
java -classpath /path/to/your/driver.jar ...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.