Why do I get a ClassNotFoundException in JDBC program?

时间:2016-07-11 20:10:47

标签: java jsp jdbc

I am using a JDBC connection to connect to a MS SQL server and I am using eclipse as an IDE. I keep getting a ClassNotFoundException but I cannot figure out why. I have the correct Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver") and I have the sqljdbc4.jar in my Eclipse build path. I have successfully run this program as a .java file but now I am trying to use it in a .jsp file. If that changes the way the program is built then maybe that could be my issue?

I tried very hard to figure this out before asking but the only answers I could find were to add the jar file to the build path and make sure to have sqlserver.jdbc and not jdbc.sqlserver.

Any ideas? thanks in advance!

0 个答案:

没有答案
相关问题