Java读取配置文件

   Properties p = new Properties();
   p.load(ClassLoader.getSystemClassLoader().getResourceAsStream("cpmi.properties"));
   String ftpServer = p.getProperty("ftpServer_test");
   String password = p.getProperty("ftpServer_test_password");
   String username = p.getProperty("ftpServer_test_user");

你可能感兴趣的:(java,properties,String,user)