[Eclipse] Java 빌드 버전과 컴파일 버전이 다를때 // (Class files' major version is different from what I choosed -- Java Developing environment



프로젝트 특성 상 Java 하위 버전(1.5)로 자바 버전을 설정해야함
--> Project properties > Java Build Path 에서 Jre를 1.5버전으로 설정


--> 해당 프로젝트를 export를 하여 사용하려 해도 버전 에러 뜸 
--> 확인 결과 major version 이 51.(51은 jdk 1.7을 의미. 49가 1.5)


--> Project properties > Java Compiler 에서도 변경해줘야 함 (1.7 -> 1.5)
---------------------------------------------------

I needed to make a Java program using older version (jdk 1.5).
So I changed to older version JRE at project's properties.(Eclipse > click right mouse button on target project > properties > Java build path > Library > slect JRE system library and click Edit button > change JRE bersion)
(If your eclipse doesn't have older jre version, you have to add it.
(1) install older jdk
(2)Eclipse > (Project's) properties > Java Build Path > Library>Click JRE System Library and then click Edit button > JRE System Installed JREs... > Add > Standard VM > Input JRE home by clicking Directory... button(JDK folder path you installed. Normally, JDK is installed program files>JAVA ). Then finish. > Check JRE you added
)

But Java classes were not compiled by JDK I changed.
(I checked my java classes' version using javap command. meaning "major version 51" is JDK 1.7. number 49 is jdk 1.5.
Finally, I knew why It didn't work.
I also had to changed compiler's JRE virsion
project's 'properties' > Java compiler > Change the version about "Compiler compliance level" to what I want.






AD_1