예전글들

이클립스 플러그인 런타임 번들 경로

진트­ 2008. 1. 1. 22:38

설명

런타임 상태에서의 현재 이클립스 플러그인의 위치 절대 경로를 알 수 있다.

 

소스코드

  1.   URL installLocation = Activator.getDefault().getBundle().getEntry("/");
      URL local = null;
      try {
       local = FileLocator.toFileURL(installLocation);
      } catch (IOException e) {
       e.printStackTrace();
      }
      String resourceRoot = new File(local.getPath()).getAbsolutePath();

 

 

이 글은 스프링노트에서 작성되었습니다.