Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Database/JDBC/SQL/JDO/Hibernate
打印话题 寄给朋友 订阅主题 |
作者 | sqlserver 加载不了 不知道 为什么 请教 |
athen
发贴: 14 积分: 0 |
于 2005-01-28 00:14
void jButton3_actionPerformed(ActionEvent e) { try{ //加载驱动程序和数据库 Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); String url="jdbc:microsoft:sqlserver://localhost:1433;"+"DatebaseName=vipquery"; Connection loginconnection= DriverManager.getConnection(url,"sa",""); //捕获异常 } catch(ClassNotFoundException cnfex) { System.err.print("装载jdbc:odbc 失败"); cnfex.printStackTrace(); System.exit(1); } 为一个按钮点击 执行事件 但在 加载的时候 抛出 异常 at java.net.URLClassLoader$1.run(URLClassLoader.java:198) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at tr.Frame1.jButton3_actionPerformed(Frame1.java:84) at tr.Frame1_jButton3_actionAdapter.actionPerformed(Frame1.java:125) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245) at java.awt.Component.processMouseEvent(Component.java:5093) at java.awt.Component.processEvent(Component.java:4890) at java.awt.Container.processEvent(Container.java:1566) at java.awt.Component.dispatchEventImpl(Component.java:3598) at java.awt.Container.dispatchEventImpl(Container.java:1623) at java.awt.Component.dispatchEvent(Component.java:3439) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095) at java.awt.Container.dispatchEventImpl(Container.java:1609) at java.awt.Window.dispatchEventImpl(Window.java:1585) at java.awt.Component.dispatchEvent(Component.java:3439) at java.awt.EventQueue.dispatchEvent(EventQueue.java:450) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) 我分析的问题是数据库 加载 不上 因为 我 发现 import com.microsoft.* 找不到 但我不知道怎么加载上去 请教 Eclipse使用技巧 |
话题树型展开 |
人气 | 标题 | 作者 | 字数 | 发贴时间 |
4842 | sqlserver 加载不了 不知道 为什么 请教 | athen | 2809 | 2005-01-28 00:14 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |