Bug 279586

Summary: Duplicate JRE added to project
Product: [Eclipse Project] JDT Reporter: Tomasz Bartczak <kretes>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 3.4.2   
Target Milestone: 3.6 M1   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Tomasz Bartczak CLA 2009-06-09 05:39:15 EDT
Build ID: M20090211-1700

It turned out that I've got two JRE in the project, while I didn't add the second manually.

I have an error and .classpath looks like this:

..
		<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
..

which shouldn't happen I assume.
Comment 1 Olivier Thomann CLA 2009-06-09 08:28:52 EDT
Would you have steps to reproduce? Did you get the same issue with 3.5RC4?
Comment 2 Tomasz Bartczak CLA 2009-06-09 09:52:35 EDT
I think the problem is with m2eclipse, as You can see in related https://bugs.eclipse.org/bugs/show_bug.cgi?id=279587

it is putting some bad markup in the.classpath file:

<classpath>
        <classpathentry kind="src" output="target/classes"
path="src/main/java"/>
        <classpathentry excluding="**" kind="src" output="target/classes"
path="src/main/resources"/>
        <classpathentry excluding="**" kind="src" output="target/classes"
path="src/main/config/WEB-INF"/>
        <classpathentry kind="src" output="target/test-classes"
path="src/test/java"/>
        <classpathentry excluding="**" kind="src" output="target/test-classes"
path="src/test/resources"/>
        <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.web.container"/>
        <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container"/>
        <classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
                <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>     </classpathentry>
        <classpathentry kind="output" path="target/classes"/>
</classpath>


look at the JRE_CONTAINER is inside MAVEN2_CLASSPATH_CONTAINER

Or it can be on Eclipse's side, if there is an API for addJRELibrary or sth like this and it's not handled properly.
Comment 3 Olivier Thomann CLA 2009-07-22 14:10:12 EDT
Closing as NOT_ECLIPSE.
Please report the problem to m2eclipse.

I would need more details from the m2eclipse team to find out how they set up the classpath container.
Comment 4 Frederic Fusier CLA 2009-08-03 10:56:10 EDT
Verified for 3.6M1