Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Package naming?
Package naming? [message #242758] Thu, 20 May 2004 12:06 Go to next message
Eclipse UserFriend
Originally posted by: bgbdwolf.gte.net

This is probably not a Eclipse problem per se, but another "stupid user
question." At any rate, I'm not sure how to accomplish it using
Eclipse, so ...

Just how do I get a package name which follows Sun's naming
conventions? IOW, I'd like to name a package something along
the lines of "com.company_name.project.component" but naming
the package in that way doesn't seem to work properly. Eclipse
accepts the name but I received some errors getting the software
to work outside the IDE.
Re: Package naming? [message #242773 is a reply to message #242758] Thu, 20 May 2004 12:14 Go to previous messageGo to next message
Scott Stanchfield is currently offline Scott StanchfieldFriend
Messages: 263
Registered: July 2009
Senior Member
Can you elaborate on what you're trying to do "outide the IDE"?

I use names like

com.javadude.penumbra.ui

all the time...

Are you prepending the package name when running ourside Eclipse? For
example:

java com.javadude.penumbra.ui.SomeApp

-- Scott

In article <c8i6ih$3al$1@eclipse.org>, bgbdwolf@gte.net says...
> This is probably not a Eclipse problem per se, but another "stupid user
> question." At any rate, I'm not sure how to accomplish it using
> Eclipse, so ...
>
> Just how do I get a package name which follows Sun's naming
> conventions? IOW, I'd like to name a package something along
> the lines of "com.company_name.project.component" but naming
> the package in that way doesn't seem to work properly. Eclipse
> accepts the name but I received some errors getting the software
> to work outside the IDE.
>
>
>
>
Re: Package naming? [message #242778 is a reply to message #242773] Thu, 20 May 2004 12:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bgbdwolf.gte.net

Scott Stanchfield wrote:

> Can you elaborate on what you're trying to do "outide the IDE"?

I'm developing an RMI application using Eclipse only for a
development RMI. The application runs inside the IDE perfectly
well but fails on "class not found" errors outside the IDE (package
classes, not RMI failures.)

> Are you prepending the package name when running ourside Eclipse? For
> example:
>
> java com.javadude.penumbra.ui.SomeApp

I'm packaging the client and server as jar files and invoking them
with the jar name which isn't prepended - something along the
lines of "java -jar someapp.jar," IIRC.

It all works perfectly if I use one-item package names (which is
the last field of the desired package name.) The problem just
occured when I was done with the prototype stage (where I
had developed with packages such as SomeApp) and tried to
refactor to "com.mycompany.project.someapp" before
releasing to my client.
Re: Package naming? [message #243033 is a reply to message #242758] Thu, 20 May 2004 22:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lorenz.m.gmx.at

Wolfie wrote:

> This is probably not a Eclipse problem per se, but another "stupid user
> question." At any rate, I'm not sure how to accomplish it using
> Eclipse, so ...
>
> Just how do I get a package name which follows Sun's naming
> conventions? IOW, I'd like to name a package something along
> the lines of "com.company_name.project.component" but naming
> the package in that way doesn't seem to work properly. Eclipse
> accepts the name but I received some errors getting the software
> to work outside the IDE.

Expirienced something similar a few weeks ago - got a "Class not found"
error when running outside of eclipse. The reason was that the classname
and the package name together were too long (don't know where the limit is).
Hope that helps
Lorenz
Re: Package naming? [message #243142 is a reply to message #242778] Fri, 21 May 2004 14:07 Go to previous messageGo to next message
Scott Stanchfield is currently offline Scott StanchfieldFriend
Messages: 263
Registered: July 2009
Senior Member
When you refactored, did you change the name of your Main-class in your
jar manifest?

-- Scott

In article <c8i86f$505$1@eclipse.org>, bgbdwolf@gte.net says...
> Scott Stanchfield wrote:
>
> > Can you elaborate on what you're trying to do "outide the IDE"?
>
> I'm developing an RMI application using Eclipse only for a
> development RMI. The application runs inside the IDE perfectly
> well but fails on "class not found" errors outside the IDE (package
> classes, not RMI failures.)
>
> > Are you prepending the package name when running ourside Eclipse? For
> > example:
> >
> > java com.javadude.penumbra.ui.SomeApp
>
> I'm packaging the client and server as jar files and invoking them
> with the jar name which isn't prepended - something along the
> lines of "java -jar someapp.jar," IIRC.
>
> It all works perfectly if I use one-item package names (which is
> the last field of the desired package name.) The problem just
> occured when I was done with the prototype stage (where I
> had developed with packages such as SomeApp) and tried to
> refactor to "com.mycompany.project.someapp" before
> releasing to my client.
>
>
>
>
Re: Package naming? [message #243417 is a reply to message #243142] Sat, 22 May 2004 03:23 Go to previous message
Eclipse UserFriend
Originally posted by: bgbdwolf.gte.net

Scott Stanchfield wrote:

> When you refactored, did you change the name of your Main-class in
> your jar manifest?

Yes. The "bug" (and I use the term loosely) seems to be the RMI
stub generation doesn't append the package name properly. IOW,
with a package name of "myUtil," the stub is placed in the package
and can be found successfully. With a package name following
naming conventions ("com.myCompany.myProject.myUtil") the
stub can no longer be found by RMI.

I got around the issue by simply placing the stub class in the codebase
location; then it works. If its wrapped in a jar, it doesn't. Weird
but I'm probably not understanding something.

Which brings up an entirely OT question -- how, other than working
in a Java shop with SOP -- does one find out about the "proper"
way to distribute & package applications? I could do it with C or
C++ -- executables, libraries, etc. I'm sure I don't understand
the Java equivalents and aren't sure where to go to learn them either.
Previous Topic:org.eclipse.ui.intro plugin, dynamic help and welcome page
Next Topic:Error: cannot run Eclipse M9
Goto Forum:
  


Current Time: Sun Jun 30 13:43:36 GMT 2024

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

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

Back to the top