Eclipse: Disappointment with Java 1.7 (unrelated library)

I'm having problems with a completely new project in a new installation of Eclipse. Repro Actions:

  • Download this version of Eclipse: http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/heliosr

  • Unzip c: \ program files \ eclipse java

  • Launch Eclipse select workspace

  • File > New > Java Project

  • Project Name: Hello World . JRE: "Use JRE Runtime: JavaSE-1.7"

  • Click Next , go to the "Libraries" tab. The only entry is the JRE System Library [JavaSE-1.7] (unrelated) . What does "unbound" mean? How to fix it?

  • Click Finish .

Expected: A new project is working great.

Actual: there are two errors:

The project cannot be built until build path errors are resolved HelloWord Unknown Java Problem Unbound classpath container: 'JRE System Library [JavaSE-1.7]' in project 'HelloWord' HelloWord Build path Build Path Problem 

What am I doing wrong here?

Update: Perhaps I actually don't have the Java 7 JDK. How can I be sure?

Update 2: It seems that Java 7 has not actually come out yet. Sweet.

+74
java eclipse ide
Aug 22 '10 at 15:37
source share
8 answers

1) Find out where java is installed on your disk, open the cmd prompt, go to this place and run ". \ Java -version" to find out the exact version. Or, just check the add / remove module in the control panel.

2) After installing jdk 7, you should report this to Eclipse. Window -> Preferences -> Java -> Installed JREs.

+103
Aug 22 '10 at 15:44
source share

To install the JDK, you can watch this video: how to install the JDK , Then when you have the JDK:

  • Right-click the build path and select Build Path
  • Select Customize Build Path
  • Click "JRE System Library [JavaSE-1.7] (unbound)"
  • Change it
  • Select "Alternate JRE"
  • Click "Installed JREs .."
  • Click Add
  • Select to add "Standard Virtual Machine"
  • Select the directory JRE Home - usually it is located in the directory "C: \ Program Files \ Java \ jre7"
  • Click Finish
  • Rechecking "Jre7" reappeared: make sure that now that you are editing the "JRE System Library [JavaSE-1.7]", "Alternate JRE" is selected for JRE7.
+11
Dec 22 '14 at 16:27
source share

1) Go to configure the build path. 2) Remove the unrelated JRE library. 3) Add Library β†’ JRE System Library.

Then we will compile and execute the project.

+8
Aug 13 '14 at 14:16
source share

In fact, you downloaded and installed one of the stages of building the milestone from https://jdk7.dev.java.net/ ?

You may have a game with features, although it is unstable, so you should not release software against them.

+2
Aug 22 '10 at 15:41
source share

In most cases, after installing Eclipse, eclipse.ini changes. If you change jdk in eclipse.ini, then eclipse will use this jdk by default.

Say you are installing a new version of Eclipse and you forgot to change the eclipse.ini associated with jdk. Then Eclipse will find jdk for you. Let's say this is java 1.6 that was automatically detected (you did nothing).

If you use maven (M2E) and you are referencing 1.7 jdk, you will see a disappointing message. But usually it does not appear because you are setting up the correct jdk in eclipse.ini.

That was my case. I made a link to pom on jdk that was not configured in Eclipse.

In the screenshot you can see that 1.7 is configured and seen by Eclipse. In this case you should make a link to pom in jre compatible with 1.7! If not β†’ disappointing message!

jdk 1.7 is configured in eclipse.ini and found in installed jre

+2
Aug 05 '14 at 13:16
source share

Cause. This is a common scenario when we import a new project with different lib and JAR paths.

I ran into this problem and got permission using the following steps:

  • Project > Properties
  • Build Path > Configure Build Path
  • Select the Libraries tab .
  • Click Add Library
  • Select "System Library JRE" from the displayed list
  • Click Next , and then Finish .

This will point your system to the correct and correct JRE path that would do for me. Greetings :)

+2
Mar 24 '16 at 6:27
source share

Updated eclipse.ini file with key-value

 -Dosgi.requiredJavaVersion=1.5 

to

 -Dosgi.requiredJavaVersion=1.8 

because this is my version of java.

Also selected by JRE 1.8 as my project library

+1
Nov 23 '16 at 5:43
source share

The eclipse.ini file has been updated with the option -Dosgi.requiredJavaVersion = 1.7 (or) 1.8, depending on what is applicable. - it works for me.

0
Jun 09 '16 at 9:41
source share