我的想法是這樣的,我想通過文本文件來獲取用戶名和密碼書上介紹用Properties對象的load方法, 我是這樣寫的 Properties pros=new properties(); 系統提示"sqlBean.java": Error #: 300 : class Properties not found in class odbc.sqlbean at line 25, column 3請問 zcjl(莫等闲,白了少年头) 怎麼解決,謝謝了
import java.io.FileInputStream; import java.util.Properties; Properties aa = new Properties(); aa.load(new FileInputStream("C:\\temp.properties"));
我是這樣寫的
Properties pros=new properties();
系統提示"sqlBean.java": Error #: 300 : class Properties not found in class odbc.sqlbean at line 25, column 3請問 zcjl(莫等闲,白了少年头) 怎麼解決,謝謝了
import java.util.Properties; Properties aa = new Properties();
aa.load(new FileInputStream("C:\\temp.properties"));
import java.util.Properties;Properties pros=new Properties();
应该就这么简单;
或是import java.util.*;
getProperty方法:public String getProperty(String key)
或是: public String getProperty(String key,String defaultValue)
查API很有用的
對了,您 能寫個例子我看看嗎
關於jdbc用Properties;的
我对jdbc不了解
去看看这个帖子吧
可能你的问题能解决