Package naming? [message #242758] |
Thu, 20 May 2004 12:06 |
Eclipse User |
|
|
|
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 #242778 is a reply to message #242773] |
Thu, 20 May 2004 12:34 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 #243417 is a reply to message #243142] |
Sat, 22 May 2004 03:23 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.03409 seconds