String configfile = "cfg/client.cfg";

            // 读取配置文件账号密码
            Properties props = new Properties();
            InputStream in = new BufferedInputStream(new FileInputStream(
                    configfile));
            props.load(in);
            String userName = props.getProperty("userName");
            String password = props.getProperty("passWord");
            // 读取配置文件账号密码

 

posted on 2018-09-03 14:22  帅过驴的袋鼠  阅读(159)  评论(0编辑  收藏  举报