Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Add default package to scrapbook
Add default package to scrapbook [message #652967] Mon, 07 February 2011 19:07 Go to next message
Dotan Cohen is currently offline Dotan CohenFriend
Messages: 23
Registered: January 2011
Junior Member
How does one add the default package to the scrapbook? Usually my packages do not have names, only "(default package)".

Thanks.
Re: Add default package to scrapbook [message #652992 is a reply to message #652967] Mon, 07 February 2011 20:20 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 07-Feb-11 12:07, Dotan Cohen wrote:
> How does one add the default package to the scrapbook? Usually my
> packages do not have names, only "(default package)".
>
> Thanks.

Dotan,

If I understand what you're asking, "(default package)" is what you see
here and there in Eclipse (but never inside source code) for code that
isn't declared as being in a package. So, if you write a Java class with
no package statement, it ends up in the "default package".

As this is sometimes confusing, I would gently suggest you not do this.
As long as you don't publish (publicly) a JAR with a package name that
doesn't belong to you, you can call your package names anything you want.

Russ
Re: Add default package to scrapbook [message #653035 is a reply to message #652992] Tue, 08 February 2011 07:49 Go to previous messageGo to next message
Dotan Cohen is currently offline Dotan CohenFriend
Messages: 23
Registered: January 2011
Junior Member
I see, so (default package) is actually no package at all.

I know that the name doesn't matter so long as I'm not publishing, but I wondered what the convention is. And if one does publish, but not from any particular website (he might upload to sourceforge, github, and some other places) then what is the convention? Or where could I read more about the naming conventions, google could not help me on that.

Thanks.
Re: Add default package to scrapbook [message #653111 is a reply to message #653035] Tue, 08 February 2011 14:42 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2011.02.08 0:49, Dotan Cohen wrote:
> I see, so (default package) is actually no package at all.
>
> I know that the name doesn't matter so long as I'm not publishing, but I
> wondered what the convention is. And if one does publish, but not from
> any particular website (he might upload to sourceforge, github, and some
> other places) then what is the convention? Or where could I read more
> about the naming conventions, google could not help me on that.
>
> Thanks.

It just has to be discrete. Typically, this can only be done using an
owned domain name--something no one else could legally and plausibly use.
Re: Add default package to scrapbook [message #653115 is a reply to message #653111] Tue, 08 February 2011 14:55 Go to previous message
Dotan Cohen is currently offline Dotan CohenFriend
Messages: 23
Registered: January 2011
Junior Member
I see, thanks.
Previous Topic:eclipse.ini options
Next Topic:xmlbuddy plugin and inline javascript highlight
Goto Forum:
  


Current Time: Wed Apr 24 17:57:42 GMT 2024

Powered by FUDForum. Page generated in 0.08409 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top