URL = new URL(this.getClass().getClassLoader().getResource("com/mycompany/data/images/1234.gif")); 或者 InputStream is = this.getClass().getClassLoader().getResourceAsStream("com/mycompany/data/images/1234.gif"));
读取classpath里的文件
最新推荐文章于 2023-12-12 18:27:25 发布