Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Workspace JRE doesn't match any configuration settings?

Tags:

java

eclipse

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:

  • Windows 7 64-bit
  • Eclipse Java EE (just installed latest version and checked for updates)

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

  • jdk1.7.0_55
  • jdk1.8.0
  • jdk1.8.0_05 --> trying to use this one
  • jre7
  • jre8

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.

like image 808
dholub Avatar asked May 06 '14 02:05

dholub


People also ask

How do I change the default JRE for all workspaces 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.

What is Workbench default JRE?

The default JRE is used for compiling and launching Java programs in all projects unless you specifically override the default JRE on a project's build path or on a launch configuration.


1 Answers

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

like image 159
jmj Avatar answered Sep 29 '22 13:09

jmj