Results 1 to 2 of 2
  1. #1
    riffla is offline Member
    Join Date
    Jun 2009
    Posts
    1
    Rep Power
    0

    Default Problems with package name

    Hi

    I'm having problem with my package name.
    As a remainder of a recent project I have a directory which simplyfied looks like this:
    myApp/src/java/com/abc/test

    and the package name set in each class under this directory is
    com.abc.test

    And if I, beneath Source tab (Java Build Path properties form) put myApp/src/java in source folders list, eclipse complains about package name not being as expected (java.com.abc.test vs. com.abc.test). And if I put myApp/src/java/com in the source folders list, eclipse gives me the following:
    Cannot nest 'myApp/src/java' inside library 'myApp/src'.

    I can see one solution, which is to remove the java directory and place the packages directly underneath the src folder, but I wonder if there is another way of doing this.
    And by the way, the reason the second complaint is there is because the myApp/src is found in the Libraries tab (beneath Web App Libraries) and can't be removed by some reason.

    Anyone?

    /R
    Last edited by riffla; 06-26-2009 at 11:41 AM.

  2. #2
    Andrey is offline Member
    Join Date
    Jul 2009
    Posts
    2
    Rep Power
    0

    Default Re: Problems with package name

    Hi,

    I was having the same problem because I wanted to have "src/main/java" and "src/main/resources" rather than just "src". This is how I solved it:
    • Removed "Web App Libraries" from "Libraries" tab
    • Exited Eclipse
    • Went to project directory and found the file ".settings/org.eclipse.wst.common.component". This file contained <wb-resource> elements for all three source folders (src, src/main/java, and src/main/resources).
    • Deleted <wb-resource> line with source-path="/src".
    • Started Eclipse
    • Added "Web App Libraries" back.

    Probably it's not the right way for fixing the problem but it worked for me.

    Hope this helps,
    Andrey

Similar Threads

  1. jxl package
    By little_polarbear in forum New To Java
    Replies: 5
    Last Post: 05-05-2009, 03:19 PM
  2. Regarding package
    By makpandian in forum New To Java
    Replies: 2
    Last Post: 03-24-2009, 06:47 PM
  3. package mj does not exist
    By PzK in forum New To Java
    Replies: 8
    Last Post: 12-03-2008, 11:30 PM
  4. get classes of a certain package
    By ashraf shaban in forum New To Java
    Replies: 4
    Last Post: 07-08-2008, 08:20 PM
  5. JXL Package
    By gaya3 in forum Java Servlet
    Replies: 1
    Last Post: 05-23-2008, 10:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •