Bug 279586 - Duplicate JRE added to project
Summary: Duplicate JRE added to project
Status: VERIFIED NOT_ECLIPSE
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.6 M1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-09 05:39 EDT by Tomasz Bartczak CLA
Modified: 2009-08-03 10:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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