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.

  1. right-click on project , select properties
  2. navigate java build path
  3. open source tab
  4. click on add source button , select src/java folder 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

Popular posts from this blog

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

node.js - Using Node without global install -

java - JavaScript + Thymeleaf - select onchange -