내가 DM-서버 여기자바 - 항아리
에 배포 jar 파일에서 XML 구성을 읽을하려고에서 XML 파일을 읽는 것은 내가 경우를 읽을 수 있었다 코드
Reader fileReader = null;
try {
fileReader = new FileReader("test.xml");
} catch (FileNotFoundException fnfex) {
fnfex.printStackTrace();
} catch (IOException ioex) {
ioex.printStackTrace();
}
에게 있습니다 난 단지 junit 테스트 w/o 항아리 및 쓰기/O를 dm 서버를 써주세요.
테스트는 jar 파일로 압축되고 jar 파일의 루트에 있습니다.
도와주세요 !!!!
가능한 복제본 [Java에서 jar 파일을 읽는 방법] (http://stackoverflow.com/questions/3369794/how-to-a-read-file-from-jar-in-java) – Qix