Unbound classpath container in Eclipse

后端 未结 13 891
后悔当初
后悔当初 2020-11-29 19:49

I have checked out a project using Subversive for Eclipse and I am getting the following errors:

  • The project cannot be built until build path errors are resolv
相关标签:
13条回答
  • 2020-11-29 20:43

    I had the same problem even after installing JDK 1.7. I corrected it by adding the bin directory to my PATH. So I went to

    computer>properties>advanced>environment variables

    and then added

    C:\Program Files\Java\jdk1.7.0_55\bin;

    then I followed these instructions

    http://clean-clouds.com/2012/12/06/how-to-install-and-add-jre7-in-eclipse/

    0 讨论(0)
  • 2020-11-29 20:44

    Click on the error message displaying "Unbound classpath container: 'JRE System Library[jdk1.5.0_08]", left click anyd choose quick fix. Under quick, list of possible options will get displated. Choose replace library. Choose the library you installed. Your good to go.

    0 讨论(0)
  • 2020-11-29 20:47

    I got the Similar issue while importing the project.

    The issue is you select "Use an execution environment JRE" and which is lower then the libraries used in the projects being imported.

    There are two ways to resolve this issue:

    1.While first time importing the project:

    in JRE tab select "USE project specific JRE" instead of "Use an execution environment JRE".
    

    2.Delete the Project from your work space and import again. This time:

    select "Check out as a project in the workspace" instead of "Check out as a project configured using the new Project Wizard"
    
    0 讨论(0)
  • 2020-11-29 20:49

    This is pretty old question and I recently came across this. Also answers says make sure that you have the correct JDK registered in Installed JRE section of Eclipse properties, and that is it. I had the correct JDK registered and that was marked as default, but still I got this error. There is one more missing piece.

    Make sure the in the Installed JREs section the name of your target runtime environment is exactly as it is mentioned in your imported project. For example if the error you get is - Unbound classpath container: 'JRE System Library [JavaSE-1.8]'. Then in Installed JREs you need to have JDK 1.8 registered and its name should be the exact value mentioned in square brackets, which in this case is JavaSE-1.8.

    0 讨论(0)
  • 2020-11-29 20:49

    I had this problem in a Java 8 Gradle project after Eclipse updated itself to 2020 09. Worse: I could manually change the project JRE as much as I liked, Gradle would always revert it. It turned out that, by default, Gradle uses the JDK with which Eclipse was started (at least Java 11 from Eclipse 2020 09 onwards). I had to explicitly tell Gradle which JDK to use.

    To make Gradle use a different JDK, you can set the property org.gradle.java.home in your gradle.properties. Note that the gradle.properties in your project will usually be in version control, and it may not be desirable to have the setting there. In that case, you can use the user-local Gradle properties (usually ~/.gradle/gradle.properties) instead.

    0 讨论(0)
  • 2020-11-29 20:51

    I had a similar problem when I recreated my workspace that was fixed in the following way:

    Go to Eclipse -> Preferences, under Java select "Installed JREs" and check one of the boxes to specify a default JRE. Click OK and then go back to your project's properties. Go to the "Java Build Path" section and choose the "Libraries" tab. Remove the unbound System Default library, then click the "Add Library" button. Select "JRE System Library" and you should be good to go!

    0 讨论(0)
提交回复
热议问题