Q: concept of JRE system library in eclipse I have been using eclipse for years but this never occurred to me. I have JDK7 installed on my system and I use this as workspace JRE. however, When I include the following definition in maven project, The library section shows java library as [JavaSE 1.6] as shown in the below image.

<build>
     <plugins>
        <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                   <source>1.6</source>
                   <target>1.6</target>
                </configuration>
        </plugin>
    </plugins>
</build>

I understand the concept of source and target configuration. But, I'm just not understanding the way JDK7 libraries acts as JRE6(Or does it?). Could anyone explain?
I'm using Eclipse Mars with JDK 1.7 as work bench JRE

A: That is the minimum configuration version of java required for your project to run(Help-->About Eclipse-->Installation details-->Configuration)
Refer the below snip,
Even though i user 1.8, the min version reqd is 1.6


A: There is no protection against using the wrong APIs when setting your configuration to an older JRE than what you are using to build.
From the manual

Note: Merely setting the target option does not guarantee that your code actually runs on a JRE with the specified version. The pitfall is unintended usage of APIs that only exist in later JREs which would make your code fail at runtime with a linkage error. To avoid this issue, you can either configure the compiler's boot classpath to match the target JRE or use the Animal Sniffer Maven Plugin to verify your code doesn't use unintended APIs.

But to answer your question:

But, I'm just not understanding the way JDK7 libraries acts as JRE6. Could anyone explain?

It doesn't, at least not really. If for example you have (only) JRE 8 installed but have your project set at JRE 7 you can write this line of code without compile error as it is legal JRE 7 Java, just using a method (join) added in JRE 8's runtime.
String join = String.join("", "a", "b");

When you run it with JRE 7 you will get this at runtime:
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.String.join(Ljava/lang/CharSequence;[Ljava/lang/CharSequence;)Ljava/lang/String;
  at snippet.Snippet.main(Snippet.java:5)

Therefore, if you really want to ensure compliance, build and develop with the right JRE installed on your system.
