可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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>
回答1:
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.
回答2:
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.
回答3:
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.
回答4:
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.