- This topic has 3 replies, 3 voices, and was last updated 19 years ago by Scott Anderson.
-
AuthorPosts
-
John FerronMemberEclipse SDK Version: 3.1.0
Build id: I20050627-1435MyEclipse JSF Support Version: 4.0.1
Build id: 20050930-4.0.1-GAApache Tomcat/5.0.19
Java 1.4.2.03
I am having issues with adding class folders to the classpath. Underneath the project, there is a collaboration_rules directory which has many sub-directories. In those sub-directories, they contain *.class files. Under Project/Properties/Libraries, I clicked “Add Class Folder” to add the collaboration_rules to the classpath. When the project re-built, I was still getting the same complation errors saying “Not a resolved type”. In a sense, the files are not on the classpath. Any ideas? I have tried searching the forum, but have not found anything pertaining to this.
John
Riyad KallaMemberJohn,
What classes are complaining about the resolved type? Are they ones inside that class folder or outside it, in your source tree? If clean the project, does that help? (I’m wondering if the errors are stale)
John FerronMemberThe classes that the IDE is complaining about is under this directory: Project/class folder/dir a/abc.class. The class directory is not underneath the source directory where all of the java code lives. These class files where not generated by the IDE, but by a third party software and are needed to be imported.
Scott AndersonParticipantJohn,
Are the classes in the appropriate folder hierarchy based on their package names? In the example above, it doesn’t appear to be the case as “abc.class” needs to be under a folder hierarchy that fully mimics the package hierarchy of the classes. So, if the package declaration for abc.class is com.something then the hierarchy needs to look like Project/classfolder/com/something/abc.class and you’ll need to add the ‘classfolder’ to the build path so that the package declarations are correct from the addpoint downward.
Another way to go would be to create a Jar of the external classes and just that instead. However, you still need to create the Jar with proper package hierarchy folders.
-
AuthorPosts