如何为属性文件提供绝对路径。在java中读取属性文件
autoamtion_environment_properties = new Properties();
InputStream iStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(("C:\\automation_environment.properties"));
这是给出null pointer exception
。
如果我在项目根文件夹中有这个文件,它可以工作,但我需要从外部访问它。任何想法需要做什么?
谢谢。