Source Folder 'folder1' in project 'ProjectA' cannot output to distinct source folder 'folder2' in Eclipse

anujspoddar picture anujspoddar · Sep 7, 2015 · Viewed 10.2k times · Source

I am getting this error in some projects in my workspace. I have tried using Luna and Juno version of eclipse but there are errors is still in there in both versions of eclipse

Content of .classpath file

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="folder1"/>
    <classpathentry kind="src" path="folder2"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/WebSphere v6.1 JRE"/>
    <classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.ibm.ws.ast.st.runtime.runtimeTarget.v61/was.base.v61"/>
    <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/hibernate"/>
    <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/log4j"/>
    <classpathentry kind="src" path="/ProjectB"/>
    <classpathentry kind="src" path="/ProjectC"/>
    <classpathentry combineaccessrules="false" kind="src" path="/ProjectD"/>
    <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
    <classpathentry kind="output" path="folder2"/>
</classpath>

There are no build path errors in ProjectB, ProjectC, ProjectD

Answer

anujspoddar picture anujspoddar · Sep 8, 2015

There is no proper solution You can change that issue from error to warning in project preferences.

Under Project Properties->Java Compiler->Building

Make Sure Enable Project Specific settings is checked, Under Build Path Problems, change Output location overlaps source location from Error to Warning/Ignore.

You can also find some related discussion on the issue over here