Re: packages?
Re: packages?
- Subject: Re: packages?
- From: Art Isbell <email@hidden>
- Date: Sun, 9 Apr 2006 12:37:18 -1000
On Apr 9, 2006, at 12:13 PM, Jeffrey Pearson wrote:
In my 'normal' java web apps, I have my classes organized into
packages as per best practices for java. I'm trying to do the same
thing with the WO app.
So I created a folder in my project "com". In that folder, I
created a folder called "metrohero". In that folder, I created a
folder called "entities".
I then created the java class from with EOModeler and saved in the
entities folder.
You can (and should) organize WO projects into Java packages by
declaring each Java file to be in a package, but Xcode/WO/whatever
doesn't require that you maintain this package organization on the
file system. There must be some sort of mojo occurring that allows
this to work correctly. Not being from the Java world, I have no
explanation. There are likely others who will tell you how to
maintain the package hierarchy on the file system as well if you so
desire. It just seems much more convenient in Xcode to have all Java
source files at the top-level where they're easy to find and select.
The one gotcha is that at runtime, the Application class name needs
to be fully-qualified to be found by the mojo that launches the app.
I set the Application class name by double-clicking the top-level
Xcode target (the <ProjectName> target) in Groups & Files, selecting
"Expert View" in the Summary Settings, and setting the
WOAPPLICATION_CLASS_NAME value to the fully-qualified Application
class name.
It is also necessary to make the Java class name of each eomodel
entity fully-qualified.
Then, somehow, everything just works.
Aloha,
Art
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden