http://m.egloos.zum.com/umzzil/v/2175356
실제 구현 내용을 간단히 살펴보면 다음과 같다.
ClassLoader cl;
cl = Thread.currentThread().getContextClassLoader();
if( cl == null )
cl = ClassLoader.getSystemClassLoader();
URL url = cl.getResource( "myprop.properties" );
위 내용은 log4j의 소스에서 일부 참조한 것이다.
실제 구현 내용을 간단히 살펴보면 다음과 같다.
ClassLoader cl;
cl = Thread.currentThread().getContextClassLoader();
if( cl == null )
cl = ClassLoader.getSystemClassLoader();
URL url = cl.getResource( "myprop.properties" );
위 내용은 log4j의 소스에서 일부 참조한 것이다.
'java' 카테고리의 다른 글
자바용 ffmpeg 래퍼 JAVE 소개 (0) | 2016.05.25 |
---|---|
특정자리수, 특정문자로 채우기 (0) | 2016.05.20 |
apache httpclient (0) | 2015.09.22 |
자바 한글인코딩 문제 모음 (0) | 2015.08.06 |
쓰레드 순차실행 (0) | 2015.06.16 |