String urlAddress = null;

Properties prop = new Properties();//创建属性类

        InputStream inStream =new FileInputStream("sys.properties");

        // this.getClass().getResourceAsStream("/sys.properties");         //Test.class.getClassLoader().getResourceAsStream("sys.properties")        //流读取属性文件

        prop.load(inStream);//加载流 

urlAddress = prop.getProperty("urlAddress");     //获取属性文件中数据名