getting JRE system library unbound error in build path
Asked Answered
A

6

38

getting a JRE system library unbound error in build path, tried all suggestions from the below links, however did not work. I have jdk 1.6.0_29, I have also tried to install other versions but no help.

JRE System Library [WebSphere v6.1 JRE] (unbound) Eclipse error: Unbound classpath container Java - Unbounded classpath container Websphere V6 JRE Struggling to update JRE dependencies within Maven and Eclipse Unbound classpath container in Eclipse unbound class path container error in eclipse? Java Web Project Build Error unbound class path container error in eclipse?

maven compiler version is something like this:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
        <source>1.6</source>
        <target>1.6</target>
        <encoding>${project.build.sourceEncoding}</encoding>
        <showDeprecation>true</showDeprecation>
    </configuration>
</plugin>
Atmometer answered 31/10, 2013 at 0:57 Comment(3)
I tried running from the directory outside eclipse, and i am getting this warning: "Workspace defines a VM that does not contain a valid jre". However i have installed necessary jdk and checked the versionAtmometer
The error indicates that you have defined a VM configuration in your eclipse that does not have a correctly configured JRE associated with it. First look and see if your Java VM is configured correctly and make sure it is pointing at the correct binaries.Charming
Yoni's answer solved my problem from this link -- #3542551Appolonia
R
95

Another option is:

  • Project > Properties > Java Build Path
  • Select Libraries tab
  • Select the troublesome JRE entry
  • Click Edit button
  • Choose an alternate JRE
  • Click Finish button

Pointing the project at your installed JRE might be a better choice than renaming your JRE to match the old project code.

Roush answered 6/12, 2013 at 22:53 Comment(2)
This did the thing for me.Rhee
The error appeared randomly in an Eclipse 2020-06 project (Java 8, no Maven). To fix it I followed the first 4 steps but then I just chose "Workspace default JRE" as "system library" (it was set to "Alternate JRE" but with the same JRE version), which fixed it after hitting "Finish" and "Apply and Close" and cleaning the project once.Redintegrate
H
12

Go to project then

Right click on project---> Build Path-->Configure build path

Now there are 4 tabs Source, Projects, Libraries, Order and Export

Go to

Libraries tab -->  Click on Add Library (shown at the right side) -->
select JRE System Library --> Next-->click Alternate JRE --> select
Installed JRE--> Finish --> Apply--> OK.
Hauser answered 9/5, 2016 at 5:38 Comment(1)
I don't see any entries under Installed JRE but I know it's installedPeridot
S
6

This is like user3076252's answer, but you'll be choosing a different set of options:

  • Project > Properties > Java Build Path
  • Select Libraries tab > Alternate JRE > Installed JREs...
  • Click "Search." Unless you know the exact folder name, you should choose a drive to search.

It should find your unbound JRE, but this time with all the numbers in it's name (rather than unbound), and you can select it. It will take a while to search the drive, but you can stop it at any time, and it will save the results, if any.

Soffit answered 3/11, 2014 at 17:17 Comment(0)
T
6

I too faced the same issue. I followed the following steps to resolve my issue -

  • Right click on your project -> Properties
  • Select Java Build Path in the left menu
  • Select Libraries tab
  • Under the module path, select the troublesome JRE entry
  • Click on Edit button
  • Select Workspace default JRE.
  • Click on Finish button

If the above steps don't work for you, instead of Workspace default JRE, you can choose an Alternate JRE and give the path to the JRE that you want to point.

Tiossem answered 25/7, 2020 at 19:16 Comment(0)
H
3

The solution that work for me is the following:

  1. Select a project
  2. Select the project menu
  3. Select properties sub-menu
  4. In the window "properties for 'your project'", select Java Build Path tab
  5. Select libraries tab
  6. Select the troublesome JRE entry
  7. Click on edit button
  8. Select JRE entry
  9. Click on finish button
Halfprice answered 24/8, 2018 at 19:53 Comment(0)
A
1

oh boy, this got resolved, I just had to name my Installed JRE appropriately. I had only the jdk installed and eclipse had taken the default jdk name, i renamed it to JavaSE-1.6 and voila it worked, though i had to redo everthing from the scratch.

Atmometer answered 1/11, 2013 at 2:53 Comment(1)
how did you rename it to JavaSE-1.6.? Seems I am facing similar issue.Illusage

© 2022 - 2024 — McMap. All rights reserved.