RE: [SOLVED] What does NSBundle.mainBundle() need?
RE: [SOLVED] What does NSBundle.mainBundle() need?
- Subject: RE: [SOLVED] What does NSBundle.mainBundle() need?
- From: "Erlandsson Martin" <email@hidden>
- Date: Tue, 11 Nov 2003 11:37:07 +0100
- Thread-topic: [SOLVED] What does NSBundle.mainBundle() need?
Thanks for your help.
None of your suggestions solved the problem, but they gave me a new angle.
I discovered that all I had to do was to add 'fork="yes"' to the junit task. I don't get why this makes any difference though. The fact that Junit starts in a JVM of its own should not make any difference, should it?
/Martin
> -----Original Message-----
> From: Chuck Hill [mailto:email@hidden]
> Sent: den 10 november 2003 19:30
> To: email@hidden
> Cc: Erlandsson Martin
> Subject: Re: What does NSBundle.mainBundle() need?
>
> If that does not work also check that the current working directory is
> the App.woa that you are working with.
>
>
> Kaj Hejer wrote:
>
> > At 17:15 +0100 10-11-03, Erlandsson Martin wrote:
> >
> >> Hi List.
> >>
> >> I am trying to create an NSBundle with the static creation method
> >> mainBundle(). It works fine in my IDE (JBuilder), but when I try to run
> >> it through ANT, I get an "ExceptionInInitializerError", caused by a null
> >> reference in a method called "LoadUserAndBundleProperties" in NSBundle.
> >>
> >> I have tried to set up all system properties and paths the same way in
> >> both environments, but I just can't find what is missing when I run
> >> through ANT. What is the absolute minimum of data needed by NSBundle to
> >> create an instance? Any other thoughts?
> >>
> >> /Martin
> >>
> >>
> >> --------- Details: -----------------------
> >>
> >> The following simple unit test passes when run in JBuilder, but causes
> >> an error when I run it with ANT.
> >>
> >> (TestGeneralTests.java:44) NSBundle bundle = NSBundle.mainBundle();
> >> (TestGeneralTests.java:45) assertNotNull(bundle);
> >
> >
> >
> > Hi!
> >
> > Try to add the following line:
> >
> > WOApplication.primeApplication(
> > NSBundle.mainBundle().bundlePath(), "Application");
> >
> >
> > -Kaj :)
> > _______________________________________________
> > webobjects-dev mailing list | email@hidden
> > Help/Unsubscribe/Archives:
> > http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> > Do not post admin requests to the list. They will be ignored.
>
> --
>
> Chuck Hill email@hidden
> Global Village Consulting Inc. http://www.global-village.net
>
> Progress is the mother of all problems.
> - G. K. Chesterton
A
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.