dholub
dholub

Reputation: 103

Eclipse Workspace JRE doesn't match any configuration settings?

I feel that I have been extremely thorough looking through previously asked questions before posting, so I will first state my issue(s), then all of the attempted steps I have taken.

The problem is when I go to create a new project, Eclipse gives a warning stating that the current workspace uses a 1.4 JRE with a compiler compliance of 1.7. I do not have a 1.4 JRE installed on my computer and everything should be configured for 1.7.

I am running:

I have currently installed under C:\Program Files\Java:

I have done the following:

  1. I have created the JAVA_HOME system variable (currently set as C:\Program Files\Java\jdk1.8.0_05) then added C:\Program Files\Java\jdk1.8.0_05\bin to the Path system variable and rebooted.

  2. I have modified eclipse.ini to hardcode the jdk path, here is the first half of the .ini:

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140116-2212
    -vm
    C:\Program Files\Java\jdk1.8.0_05\bin\javaw.exe
    -product
    org.eclipse.epp.package.jee.product
    --launcher.defaultAction
    openFile
    ....
    
  3. I have added C:\Program Files\Java\jdk1.8.0_05 to the 'Installed JRE' list, made the appropriate selections in the 'Execution Environment' screen, and pointed all of my projects to follow the workspace settings:

Not sure if the following is related/helps with troubleshooting:

In a project I just imported, I originally had errors stating I needed a compiler of atleast 1.5. After performing the steps above, and setting the compiler (apparently unsuccessfully) to 1.7 they have turned into warnings, complaining about controllers being deprecated.

Please help me figure out why my Eclipse thinks it's stuck on a 1.4 JRE. I really hope I'm just missing something simple.

Upvotes: 10

Views: 2331

Answers (1)

Jigar Joshi
Jigar Joshi

Reputation: 240996

install updates for eclipse that understands java 8 from : https://wiki.eclipse.org/JDT/Eclipse_Java_8_Support_For_Kepler

then

windows > preference > java > compiler > compiler complance level = 1.8

Upvotes: 6

Related Questions