[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.rcp] Re: Path problem
|
Your plugin location is relative. And you have to do every operation with
the Bundle.
I am doing the following to get a relative URL:
URL cfgURL =
Platform.getProduct().getDefiningBundle().getEntry("res/XXX.cfg");
or if you don't have branded your applictaion I think you have to use the
following:
URL cfgURL = Platform.getBundle("ID of your Plugin
here").getEntry("res/XXX.cfg");
I hope this helps.
-Rene-
"Luke Stephens" <lwsiv@xxxxxxxxxxxxx> schrieb im Newsbeitrag
news:ck3nqh$5o1$1@xxxxxxxxxxxxxx
>I am trying to load a 3rd party lib properties file that is required for
> my rcp based application. I have a folder /res that sits off of my plugin
> folder path. when i try to relative reference this folder (as in
> "/res/...") it comes up missing. I grabbed the System - "user.dir"
> property and it is pointing to my eclipse installation dir (which is why
> the path does not work). How do I set the run-time "user.dir" to be my
> plugin directory, or otherwise relative reference my "res" path??
>