在Android项目中,我可以将配置文件放在哪里?目前,在res目录中,我被设置为:res/config/configuration.properties目录。and want to access it as :properties.load(getClass().getResourceAsStream("config/configuration.properties"));
它不起作用:输入流为空</
在阅读了问题之后,在从使用IntelliJ构建的maven项目的类路径读取文件时,我尝试了以下方法: classLoader = this.getClass().getClassLoader();
res = classLoader.getResourceAsStreamreturn new BufferedReader(getInputS
当我从eclipse运行我的代码时,它可以工作文件。但是,当我创建可执行的jar文件时,它无法读取文件。(String resource) final InputStream in = getContextClassLoader().getResourceAsStream(resource);() return Thread.currentThread().getContextClassLoader();在这里,我注意到当我从命令运行时,InputStream是空的,但是在运