java 打jar包配置文件和jar包通级
类
public class jarTs { public static void main(String[] args) throws IOException { String path =System.getProperty("user.dir"); System.out.println("user.dir: " + path); String proPath = path + File.separator +"properties"; FileInputStream in = new FileInputStream(proPath); Properties props = new Properties(); props.load(in); in.close(); String libPathKey = "lib_path"; String libPath = props.getProperty(libPathKey); System.out.println("lib文件路径," + libPath); } }