Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Have two JDK installed, how to switch the java compiler in Eclipse [duplicate]

Tags:

java

eclipse

I am wondering how to switch the java compiler in Eclipse.

like image 377
user496949 Avatar asked Mar 23 '11 10:03

user496949


People also ask

How do I change the Compiler in Eclipse?

To change the compiler version in eclipse you need to go to Windows > Preferences > Java > Compiler. There you will see Compiler Compilation Level where in drop-down you will see all compiler version available in system.

How do I change the default Java version in eclipse?

Configure the default JRE Set it as the default in Eclipse by selecting Preferences -> Java -> Installed JREs. Add the installed JDK and select the checkbox, making it the default.


2 Answers

Eclipse does not use the compiler in the JDK, just the runtime libraries. The compiler is embedded in Eclipse (so you can run on a plain JRE).

You set all the compiler properties in the Java->Compiler preference window, and the class libraries in the chosen JRE.

like image 66
Thorbjørn Ravn Andersen Avatar answered Sep 28 '22 05:09

Thorbjørn Ravn Andersen


Window > Prefrences > Java > Installed JREs

like image 40
Peeter Avatar answered Sep 28 '22 07:09

Peeter