이클립스를 쓰고 있는 사람들을 보다보면
BUILD_PATH를 JDK가 아닌 기본으로 잡히는 JRE를 쓰고 있는 것을 종종 보게 된다.
쓰는 사람이 별 불편함이 없게 느낀다면 상관없지만,
어쨌든 내 입장에서 보면 불편하다 -_-;;
이번 팁은 며칠 전 릴리즈 된 eclipse ganymede 를 기준으로 진행하겠다.
(이전버전도 별 차이는 없으니 신경쓰지 말자)

Eclipse 3.4!!

뒤에 인자들이 arg0, arg1, arg2.... 오잉
무언가 이상하다!!
F3 을 눌러 소스코드를 한번 보자..

패키지 탐색기쪽을 자세히 보자..
JRE 시스템 라이브러리..
JRE엔 당연히! 소스코드가 없다.
오직 실행만을 위한 Java Runtime Environment 이기 때문이다

그렇다면 해결책은?
build path 에 잡혀있는 JRE를 JDK로 바꿔주면 되는것이다....
JDK 설치가 되어있지 않다면, 우선 설치부터 ㄱ


설치된!? JRE 목록...
설치된 JRE들이 아니라 이클립스에서 인식하고 있는 JRE들이다..
Search 를 누르고



어쨌든 jdk 1.6.0_10 으로 선택하고 OK

자 그러면 방금전 그 소스코드로 다시 돌아가보자.

적절한 이름들이 들어가 있는걸 확인할수 있다.
Thread 에서 F3을 눌러서 소스코드를 살펴보자

이왕이면 JRE 보다는 JDK로 잡아놓고 개발하는 것이 편하지 않겠는가!
어쨌든, 문제 해결!