Community
Participate
Working Groups
If you create a custom IClassPathEntry class then JavaProject.computePackageFragmentRoots throws an exception when the IClassPathEntry passed to the method is cast to the internal ClasspathEntry String rootID = ((ClasspathEntry)resolvedEntry).rootID(); My work around is to create an instance of ClasspathEntry rather than my custom IClasspathEntry. This is not 100% legit as the ClasspathEntry class is in an internal package.
From IClasspathEntry javadoc: * This interface is not intended to be implemented by clients. * Classpath entries can be created via methods on <code>JavaCore</code>.
Closing, working as designed.