"Build path entry is missing" error when trying to create a new project in Eclipse
Build path entry is missing: org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7
I get this error when I create a new project in Eclipse. I am using Ubuntu by the way.
Can anyone help me fixing this?
It is an old question, but I solved it by modifying JRE system library and select a valid Execution environment in my case (Mac OSX) JRE 1.6
This error is due to JRE System Library. Maybe you didn't give appropriate JRE for eclipse project to run. SO follow below steps.
- Right-click on the project and choose properties.
- Click on the Java Build Path option in the left side menu.
- From the Java Build Path window, click on the Libraries Tab.
- Make sure JRE System library is listed, if it is not listed then you can add, by clicking "Add Library" from the right side menu.
- So if JRE System Library is already listed then double click on JRE System Library which was showing error on Java Build Path window Libraries tab previously .
- Then it will open another window called JRE System Library . So in that window choose Alternate JRE . From that drop down choose your JRE.
In my case, it is java-8-openjdk-amd64 , as I am using ubuntu 16.04. Like that you can also choose your JRE System library .
This is because JRE is not present in the build path of your project. So trying adding JRE from Windows->Preferences->Installed JREs and Add the default JRE. After that the JRE gets added by default in the build path of every project. This should solve the issue
I already had JDK installed but i still had errors, so I opened command prompt locating it to my project:
c:\project\proj>. Then I ran
mvn clean && mvn install.
That solved my issue !
I solved this by configure the .classpath file. I use maven and I deleted a line with some invalid setting in the marked place shown below.
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" output="target/classes" path="src"> <attributes> <attribute name="optional" value="true"/> <attribute name="maven.pomderived" value="true"/> </attributes> </classpathentry> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <attributes> <attribute name="maven.pomderived" value="true"/> </attributes> </classpathentry> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <attributes> <attribute name="maven.pomderived" value="true"/> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> </attributes> </classpathentry> -----some files which is actually deleted in my project, I delete this line and all works fine------ <classpathentry kind="output" path="target/classes"/> </classpath>
- Did you remove a JDK from your computer ?
- No I didn't remove anything. I installed JDK 1.7.
- Check that update-java-alternatives are set to the right jdk
- I tried to set it to Oracles JDK but it didnt work. Gave me an error so I set it back to OpenJDK.
- @IlhamiD When you solve yourself a question, it's a good practice to write the solution as an answer so that it may help somebody else later. You may also accept it.
- how you did this, can you wrote step by step?
- @Line properties->java build path ->libraries-> add library ->jre system library -> in my case i added jre 8.x and removed existing old jre after then my src(java,test) folders added without any error. good luck..
- Which is "default"? I have "Execution Environment Description", "Standard 1.1.x VM" and "Standard VM". Did you mean the third?
- Add it from from Standard VM