properties资源文件utils类
资源文件中的路径解决问题 //鑾峰彇璧勬簮鏂囦欢鐨勮矾寰? String filepath = ContentMessage.class.getClassLoader().getResource("") .getPath(); filepath = filepath.substring(0, filepath.length() - 8); filepath = filepath + "resource/ApplicationResources.properties"; File file = new File(filepath);