[JAVA] classloader#getSystemResourceAsStream() public static Properties getProperties(String filePath) throws IOException{ //ClassLoader로 InputStream 생성 //InputStream is = ClassLoader.getSystemResourceAsStream(filePath); InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(filePath); Properties props = new Properties(); props.load(is); return props; } getClass().getResourceAsStream(filePath) 와 같음. 단 getClass()... 더보기 이전 1 ··· 705 706 707 708 709 710 711 ··· 713 다음