I am trying to use the jtds driver to connect to a MSSQL database, and can’t get past the Class.forName line in the code. I have done exhausting google searches and found others with the same problem, but no definitive solution or workaround. I’m guessing there must be something wrong with my Jython setup or installation.


I am testing with NetBeans 6.7, and have tried this with Jython versions 2.2, 2.5b0+, and 2.5rc3. Within NetBeans, under services, I set up the jtds driver, and was able to define a URL and connect to my database, so I assume the rest of my code will work if I get past the Class.forName problem.


The code is pretty basic:


from java.sql import DriverManager

from java.lang import Class




Error: “java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver”


I found one note that mentioned adding “–verify” to the command arguments, but other notes saying that it wasn’t necessary with version 2.5.


Any ideas?