facebook

public folder name ?

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #281055 Reply

    edbras
    Member

    Hellu,

    I see that if I create a new folder with the name “public” in an existing package, that it is seen as a resource folder instead of a package.

    How can I realize the same result for folders with other names (name web instead as public for example)?

    I hope you understand me, otherwise, just create a folder public in a package and a folder bla in an existing package.. and you will see what I mean….

    I searched about everywhere, but I can’t find it…. 🙁
    Please some advice

    #281064 Reply

    Loyal Water
    Member

    You cannot use public since it is not a valid Java identifier for packages.

    #281068 Reply

    edbras
    Member

    Thank you for your quick answer.

    I am aware that public isn’t a valid pacakge identier, but that’s not what I like to know.

    I want to indicate if something is a resource folder or a package identifier.
    The name “public” isn’t a valid identifier and as such automatically seen as a resource folder.
    However I would like to indicate this, such that if I create a folder in com.bla.some is also treated as a resource folder, just as “public”

    #281216 Reply

    Riyad Kalla
    Member

    Ed, there is no such thing as a resource folder in Eclipse… just create any package you want, and put whatever you want in it. Normally people indicate the use of the particular package by it’s name, for example int he Swing App framework, any package named “resources” is automatically treated as the resource package (properties files, images, etc.) for classes in the package above it… like:

    com.myapp.resources

    that package would have resources for the UI classes in com.myapp

    The only reason your folder named “public” is showing up as a non-package, is because it’s an illegal package name, so Eclipse is forcibly removing it from the package hierarchy and changing it’s icon, instead of giving you a warning saying “don’t use that name”.

    Hope that helps.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: public folder name ?

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