看板 java 關於我們 聯絡資訊
請問一下,當我要用jdbc 來接資料庫的時候 , try { Class.forName("easysoft.sql.jobDriver"); Properties props = new Properties(); props.put("logonuser", "NCS"); props.put("logonpassword", "ncs2007"); props.put("useUnicode", "true"); con = DriverManager.getConnection(dbURL, props); } catch (Exception err) { System.out.println( "Error: " + err ); } 卻出現java.lang.ClassNotFoundException:easysoft.sql.jobDriver 表示classloader cannot locate the driver class,我是去easysoft.com下載driver 要來連接microsoft office access的,可是一直不能load這個driver. 請問是path設定不正確嗎?還是哪裡可能有問題,謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 65.190.207.14
TonyQ:要設定classpath , 通常是你的driver沒放到正確位置 :P 12/21 14:39
qrtt1:要注意一下, path 不等於 classpath :) 12/21 14:55