• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Loading a model from a referenced framework in a jar project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading a model from a referenced framework in a jar project


  • Subject: Re: Loading a model from a referenced framework in a jar project
  • From: "Richard Stephens" <email@hidden>
  • Date: Sun, 28 Dec 2008 14:47:28 +1000

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@hidden> wrote:
> Hi Richard,
>
> On Fri, Dec 26, 2008 at 5:49 AM, Richard Stephens <email@hidden> 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@hidden
>>  _______________________________________________
>> 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
>>
>



--
Regards,
Richard Stephens
Ph: 07 3136 3426
Mob: 0410 111 570
Email: email@hidden
 _______________________________________________
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

  • Follow-Ups:
    • Re: Loading a model from a referenced framework in a jar project
      • From: Lachlan Deck <email@hidden>
References: 
 >Loading a model from a referenced framework in a jar project (From: Richard Stephens <email@hidden>)
 >Re: Loading a model from a referenced framework in a jar project (From: "Henrique Prange" <email@hidden>)

  • Prev by Date: Re: WOX status??
  • Next by Date: Re: Wonder tutorial, part 1
  • Previous by thread: Re: Loading a model from a referenced framework in a jar project
  • Next by thread: Re: Loading a model from a referenced framework in a jar project
  • Index(es):
    • Date
    • Thread