0

I've already installed JDK and JRE and I created a project, tried to build an application and encountered an error:

"no compiler is configured and need to check JDK"

So I went to Windows/Preference/Java as follows, but I can't find JDK.

How can I solve this issue?

enter image description here

piet.t
  • 11,718
  • 21
  • 43
  • 52
Jin
  • 924
  • 1
  • 9
  • 34
  • You see the empty check mark next to the installed JDK. What happens when you select it and try again? – starturtle Aug 23 '16 at 05:35
  • Have you installed both 32bit jre/jdk or 64bit? Look at http://stackoverflow.com/questions/10943763/using-64bit-and-32-bit-jdk – Fr333du Aug 23 '16 at 06:02
  • Don't expand Installed JREs. Click on it and then you have the option. Once you are there, click on `Add` and add the `JDK` location. – James Jithin Aug 23 '16 at 06:29
  • Could you tell me the location of jdk pls? I've installed it in C:\ProgramFiles\Java\jdk_1.8 ... – Jin Aug 23 '16 at 06:42
  • Right-click(Alt+Enter) your project, choose `Java Build Path`, then select `Libraries` tab, see if your jdk is shown there. If not, click `Add Library..` button to specify your jdk location. – Sky Aug 23 '16 at 07:02
  • Clicking Add Library button it shows lists as follows."connectivity driver definition", "user library",'web app libraries' etc. What is correct item? – Jin Aug 23 '16 at 07:10

1 Answers1

0

Well if you did download and isntall the newest JDK (NOT JRE) then you should be able to find id on your system. Check your operating system for the right version (32 bit or 64 bit)..

After that in Eclipse under Window/Preferences/Java/Insalled JREs you can add the JDK definition you installed and want to use. Just click on the Add button and add it, don't forget to check it as the default, then Apply!

If you go then to your project, right click it, go to Build Path/Configure Build Path, under the tabb Libraries you should see your selected JDK version as System Library.

Under Java Compiler you can check the Compiler coplience level: Eclipse Mars has 1.8 as Default e.g.

Hope this helps you to set up your Eclipse..

Inuendo
  • 67
  • 1
  • 8