Properites pros=new Properties();
pros.load(new FileInputStream(new File("mail.config")));String mail_rule=properties.get("mail.rule");
..

解决方案 »

  1.   

    to 树根兄
    这样的方法不是读写.properties文件的吗?
    .config也是这样读啊?呵呵
      

  2.   

    Properties pros=new Properties();
    pros.load(new FileInputStream(new File("mail.config")));读:
    String mail_rule=properties.get("mail.rule");写:
    properties.setProperty("mail.rule", "XXXXXXXXXXXX")
      

  3.   

    请教如何提问?我怎么找不到提问的地方?我有很多问题急着问
    -------------------
    在java里点到一个具体的小模块,如J2SE/基础类
    电击右上角要个提问.
      

  4.   

    我知道了
    原来只要符合
    “名称=值”这样的格式的文件都可以用Properties来读写
      

  5.   

    Properites pros=new Properties();
    pros.load(new FileInputStream(new File("mail.config")));
      

  6.   

    properties.setProperty("mail.rule", "XXXXXXXXXXXX")
    写的时候不好使呀??
      

  7.   

    这个哪里是写呀
    pros.store(new FileOutputStream(new File("mail.config")),"header");