Why is IJavaProject.findPackageFragmentRoots returning an empty array?

This was a bug that was fixed in Eclipse 3.7 (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=324367).

As per the new API:

The result does not include package fragment roots in other projects referenced on this project’s classpath.

See http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/IJavaProject.html

Leave a Comment