java - How to import netbeans project to eclipse ignoring package declaration? -
i have (legacy) netbeans project i'd import , maintain in eclipse. sake of have provide backwards compatibility netbeans project recourses.
problem: source folders have hirarchie src/java/de/mycompany/..., classes themself have following package imports:
package de.mycompany; //error public class mainclass { } when opening project in netbeans ide not complain package source mismatch. eclipse does:
error: declared package "de.mycompany" not match expected package "java.de.mycompany".
question: how can overcome this, if possible @ all? cannot move java classes "right" package declaration of packages have left untouched compatibility reasons...
you need configure source folders in eclipse.
- right-click on project , select
properties - navigate
java build path - open
sourcetab - click on
add sourcebutton , selectsrc/javafolder in order add source folder.
you note change adds classpathentry entry within eclipse specific .classpath file.
a project in context of netbeans has different structure project in eclipse. that's why using maven (with corresponding ide plugins) can helpful here.
Comments
Post a Comment