ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver

The issue of java.lang.ClassNotFoundException might be the outcome of several reasons:

  • Jar file is not available in class path. (This is not your case. as you have mentioned).

  • Your jar file is corrupted.

  • Your environment variable value is not accessible by current user. (Permission revoked by administrator).

  • Current user don't have permission to read jar file.

Please verify the last three options.


Right button on project-> Properties - > Java built Path -> Order and Export -> And check checkBox with you jar.

If you connect on Android project to Use 1.2.7 version.

Tags:

Java

Jdbc

Jtds