3

I have the same problem as in the post: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

I follow the steps of the first comment in that post. But I can not find a JDK folder. To illustrate this I add a picture how it looks like:

enter image description here

So, as you can see, I have no jdk- folder . And I would like to know, why? And what to do? When I run "clean install" from the command line, then everything is okay. In Eclipse, I get the message that I run perhaps on JRE instead of JDK.

edit: I have also installed the jdk folder. Here again, a picture: enter image description here

Community
  • 1
  • 1
user3097712
  • 1,565
  • 6
  • 27
  • 49

3 Answers3

4

I have make for you the the various steps to follow to specify the JDK to use with Eclipse. Of course you can make more than one JDK then in the build path for any project You can specify the JRE.

Here is same Screen shots:

Step1:

enter image description here

Step 2:

enter image description here

Step 3

enter image description here:

Community
  • 1
  • 1
Abder KRIMA
  • 3,418
  • 5
  • 31
  • 54
2

You must tell Eclipse the location of the JDK you want it to use.

You do this in the Preferences on the 'Java > Installed JREs' page. If the JDK is not shown there click the 'Add...' button. Choose the type of JRE/JDK (normally 'Standard VM' except on a Mac). On the next page enter the directory containing the JDK.

Once you have entered the JDK location it will show in the list on the Installed JREs page. Click OK to close the Preferences and save this list. You can then open the Preferences again and the JDK should now be shown in the Execution Environments page.

greg-449
  • 109,219
  • 232
  • 102
  • 145
2

Perhaps your java_home variable is set to use jre rather than jdk. Change your java_home variable as 'C:\Program Files\Java\jdk1.8.0_25' accordingly. Also jdk_home variable as 'C:\Program Files\Java\jdk1.8.0_25'.