I used to have Eclipse configured well and work fine before. But I just uninstalled it and installed Eclipse Juno again on my Mac OS 10.10 today. But I kept getting this err
I had the problem with one particular run configuration (unittests for one project in my case). In Run Configurations, I selected the troubled run configuration, then the JRE tab, and I could see it was broken (even though I couldn’t tell how it had happened). Selecting the right JRE solved my problem (project JRE in my case, even though this was just my standard JRE and not configured for the project specifically).
I had the same problem. This is how I fixed it.
Preferences
.Add
Standard VM
.Directory
Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/
Open
Finish
Properties
Java Build Path
then click Add Library
JRE System Library
Environments
and select the jdk1.7.0_45
Finish
This is what you should see if you did it right:
Your run configurations maybe trying to use a specific JRE.
Make sure you are using the correct JRE there.
In eclipse click Window –> Show view –> Servers
Once you are in servers view double click configured server to open its configuration and click Runtime environment link (in the left side).
Select the JRE and click finish.
Hope it help you
The problem is generally related to project or plugin-specific runtime configurations that (still) point to some JDK/JRE that is not existing anymore (e.g. after some update or migration).
We had this e.g. with the ANT plugin, where the launch configuration had to be updated (per ant build file), if it was e.g. not set to the default ~ run in same JRE as workspace
.
You will find these settings (typicall under the JRE
tab) either:
in the global plugin configuration under Eclipse -> Window -> Preferences -> ...
of your plugin (typing runtime
in the Filter
section above may help to find it quickly).
or it is set in a project/file-specific run configuration which you should see if you go to
Eclipse -> Run -> Run configurations...
orRun As -> Run Configurations ...
or it is set in a project/file-specific external tool configuration (e.g. like used by ANT) which is similarly to be found here:
Eclipse -> Run -> External Tools -> External Tools Configuration ...
orRun As -> External Tool Configurations ...
Main Cause of this Error is You Maybe forgot the set Build patch. When you Import Old Project this time Old Java Build Patch Existing You Have to give New One which one you currently using in your work space.
Process:- Right Click Project -> Build patch -> Configure Build path-> Add Library-> System Library-> Set JRE (Default or Alternative)