Hey, thanks

That looks like it might do what I want but doesn't seem to be working.
As it is, my code looks like this:

                URL modelUrl =
TblUser.class.getClass().getResource("/Resources/ndbmodel.eomodeld");

                System.out.println( modelUrl.toString());

Where TblUser is a class in the framework containing the model i want
to load.  However this just throws a null pointer exception
(getResource() returns null)

I also tried a few variants such as getResource("Resources/ndbmodel.eomodeld");
and getResource("ndbmodel.eomodeld");

However I can't see a way to find out the root path that getResource
searches from.



On Sat, Dec 27, 2008 at 11:39 PM, Henrique Prange <[email protected]> wrote:
> Hi Richard,
>
> On Fri, Dec 26, 2008 at 5:49 AM, Richard Stephens <[email protected]> wrote:
>> Hi
>> How do I load a model from a referenced framework in a Jar project?
>
> You can try something like this:
>
> URL modelUrl = getClass().getResource("/Resources/YourModel.eomodeld");
>
> EOModelGroup.defaultGroup().addModelWithPathURL(modelUrl);
>
> Cheers,
>
> Henrique
>
>> --
>> Regards, Richard Stephens Ph: 07 3136 3426 Mob: 0410 111 570 Email:
>> [email protected]
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/hprange%40gmail.com
>>
>> This email sent to [email protected]
>>
>



-- 
Regards,
Richard Stephens
Ph: 07 3136 3426
Mob: 0410 111 570
Email: [email protected]
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to