作者hfnadkv (衝衝衝)
看板java
標題[問題] JDBF連結問題
時間Thu Jan 17 16:33:53 2008
昨天發問過,但因為說明過於簡單,加上剛才又找到中文的說明檔
所以重po一次
因為要連*.dbf的檔案
所以找了JDBF這個套件來用
http://www.svcon.com/jdbf/docs/index.html
中文說明檔:
http://tinyurl.com/3xd57n
但執行下面程式時,一直是出現錯誤(JDBFException指出找不到檔案)
不知哪個環節出錯了?!謝謝大大解答
Exception in thread "main" java.lang.Error:
Unresolved compilation problem:
Unhandled exception type JDBFException at testReadDBF3.main(testReadDBF3.java:
13)
import com.svcon.jdbf.DBFReader;
public class testReadDBF{
public static void main(String[] args) {
DBFReader test = new DBFReader("db/Book1.dbf");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
指向這裡
System.out.println (test.getFieldCount()); //算出有幾個欄位
}
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 134.208.29.133
※ 編輯: hfnadkv 來自: 134.208.29.133 (01/17 16:35)
推 superlubu:DBFReader constructor throws JDBFException 01/17 16:57
→ superlubu:而你沒有 catch 也沒有在 main method 定義 throws out 01/17 17:00
推 TonyQ:-3-;; 回太久了....沒看到樓上已經回了XD 01/17 17:36