Skip to main content



      Home
Home » Newcomers » Newcomers » Add default package to scrapbook
Add default package to scrapbook [message #652967] Mon, 07 February 2011 14:07 Go to next message
Eclipse UserFriend
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 15:20 Go to previous messageGo to next message
Eclipse UserFriend
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 02:49 Go to previous messageGo to next message
Eclipse UserFriend
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 09:42 Go to previous messageGo to next message
Eclipse UserFriend
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 09:55 Go to previous message
Eclipse UserFriend
I see, thanks.
Previous Topic:eclipse.ini options
Next Topic:xmlbuddy plugin and inline javascript highlight
Goto Forum:
  


Current Time: Sat Nov 08 15:06:26 EST 2025

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

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

Back to the top