3.2m5 "os x" plugin dir? [message #444813] |
Tue, 21 February 2006 15:04 |
scb Messages: 43 Registered: July 2009 |
Member |
|
|
i've been using the Bundle.getEntry("/") method to find my plugin's
directory in the install, and it worked fine in 3.1.x.
I moved to 3.2m5 over the weekend, and things seem broken now.
bit of background:
one of my projects calls a few unix apps, which i have stored in my
plugin's root. they're called via Runtime.getRuntime().exec(), passing
in command line arguments. In 3.1.x, I could find the location of the
plugin root and feed it in as an environment variable for the command's
path.
so if myApp was here:
/Users/me/Desktop/myApp
when launched, the app would look somewhere like this:
/Users/me/Desktop/myApp/plugins/myPlugin0.0.0/
to find the unix executable. It got that from Bundle.getEntry("/").
In 3.2m5 on os x (i didn't try another platform), it doesn't seem this
simple anymore. When launched, the app is looking a few directories down
in the osgi directory in the configuration directory, instead of my
plugin's root
Did something change with Bundle.getEntry("/")? Or is this a 3.2m5 bug?
Scott
|
|
|
Re: 3.2m5 "os x" plugin dir? [message #444848 is a reply to message #444813] |
Wed, 22 February 2006 13:54 |
|
scott brown wrote:
>
> /Users/me/Desktop/myApp/plugins/myPlugin0.0.0/
>
> to find the unix executable. It got that from Bundle.getEntry("/").
>
> In 3.2m5 on os x (i didn't try another platform), it doesn't seem this
> simple anymore. When launched, the app is looking a few directories
> down in the osgi directory in the configuration directory, instead of my
> plugin's root
And it can't find the executables in the new directory path anymore?
> Did something change with Bundle.getEntry("/")? Or is this a 3.2m5 bug?
No, it's not a bug. You were always supposed to use Platform#asLocalURL(*).
Bundle#getEntry(*) returns a URL ... that could be a path into a jar,
etc. Check out Platform#asLocalURL(*) for instructions on how to
actually find files (it's deprecated in 3.2, but includes links to the
new procedures).
Later,
PW
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
Powered by
FUDForum. Page generated in 0.06728 seconds