u should set ur classpath,before u run this command,or get the classpath parameter to the java command.
解决方案 »
- struts2 求帮助
- Unexpected exception parsing XML document from ServletContext resource
- struts的客户端验证,总是不能实现...不知道为什么..
- 把值放在request.setParameter request.setHeader有何区别
- jsp参数问题
- web项目下的“库”中的jar和WebContent/WEB-INF/lib下面的jar有什么区别?
- tomcat5.0中servlet的使用问题!
- 如何检测链接池中的链接还是有效的
- 乱码
- 有谁知道properties文件的用法?
- 一个form参数传递的错误!
- 时间的问题!在线等!
变为:
Class.forName("com.jnetdirect.jsql.JSQLDriver");
这种错误是你没有配置你的参数。在JBuild中你将驱动三个文件加进来。tools---enterprice setup
改main函数声明
是一个jdbc连接MsSQL Server2000的例子
String drv = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
String url = "jdbc:microsoft:sqlserver://127.0.0.1:1433";
String uid = "sa";
String pwd = "123456"; Connection cn=null;
try
{
Class.forName(drv).newInstance();
cn=DriverManager.getConnection(url,uid,pwd);
}
catch (Exception e)
{
e.printStackTrace();
}http://www.chinajavaworld.net/forum/view.cgi?forum=44&topic=346