facebook

Linked Resources

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #200265 Reply

    Suneet Shah
    Member

    Hello,

    In our development , we have been maintaining the source for our web apps in a directory called SRC that is shared across multiple webapp. I I would like to use some of the packages under SRC in my webapp. So I used linkedresources to make that code available. However, I am getting a “The declared package does not match the expected package” error in all the files. Is there anyway to get around this?

    Thanks
    Suneet

    fyi: The directory structure is like

    WEBAPP
    – SRC
    – mywebapp
    – webroot
    – mysrc

    #200267 Reply

    The directory structure is not correct.

    src/com/test/MyTest.java
    -> MyTest.java is interpreted as a class of package com.test cause src is the source folder (=default package).

    If you are using com as a sourcefolder, then MyTest is interpreted to be in package test. And if the package statement of the source/class file says com.test is the correct one, then you’ll get an error like yours.

    Just check if your linked resources/source folders target the right directory.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Linked Resources

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