aspose file tools*
The moose likes Beginning Java and the fly likes Creating Class files without using the Default Package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Creating Class files without using the Default Package" Watch "Creating Class files without using the Default Package" New topic
Author

Creating Class files without using the Default Package

Emmett Brannon
Greenhorn

Joined: May 20, 2011
Posts: 2

I have been using Eclipse to learn Java.
I'm near completion of an 87 lesson beginners tutorial and I have yet to figure out how to create a New Class and not get the following message at the top of the New Class Wizard.
"The use of the default package is discouraged."
Up to now I have been ignoring it and no issues have surfaced.
The warning bugs me and I don't want problems to start cropping up when I move to the next set of tutorials which will be more complex.

Would someone be so kind to explain how to alleviate the warning?

Sorry if its been explained before but I have searched everywhere for the answer to no avail.
I don't seem to be able to come up with the correct search term/terms.
Thank You
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

I'd try Java packages.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Emmett Brannon
Greenhorn

Joined: May 20, 2011
Posts: 2

Bear Bibeault wrote:I'd try Java packages.
Oh for gosh sakes. I've been over complicating the issue and confusing Package with Project.
Now I know to look in the Projects Node, Open my project and if there is only the "Default Package" in the "Source Packages" folder...
All I need do in that case is:
Right click the "Source Packages" folder and select "New"/"Java Package.
That action will place a Non Default Package into my Project.
From there I add Classes to the new Non Default Package.

Thank You
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating Class files without using the Default Package