简体   繁体   中英

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. 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 ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM