'file path'에 해당되는 글 1건

  1. 2014.02.20 [eclipse] file path 확인.

[eclipse] file path 확인.

ITWeb/개발일반 2014. 2. 20. 11:33

간혹 eclipse 프로젝트에서 folder 만들고 file 생성해서 읽어야 할 때 path 설정을 어떻게 해야 하지 할때가 있습니다.

뭐 없으면 말구요 ㅋ.

아래 코드를 이용해서 현재 실행 중인 클래스의 path 가 어디를 보고 있는지 확인 하신 후 설정 하시면 file not found 는 나지 않을 겁니다.


System.out.println(new java.io.File("").getAbsolutePath());
System.out.println(실행클래스명.class.getClassLoader().getResource("").getPath());

: