facebook

Adding *.class to classpath

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #240523 Reply

    John Ferron
    Member

    Eclipse SDK Version: 3.1.0
    Build id: I20050627-1435

    MyEclipse JSF Support Version: 4.0.1
    Build id: 20050930-4.0.1-GA

    Apache 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

    #240534 Reply

    Riyad Kalla
    Member

    John,
    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)

    #240580 Reply

    John Ferron
    Member

    The 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.

    #240830 Reply

    Scott Anderson
    Participant

    John,

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Adding *.class to classpath

You must be logged in to post in the forum log in