Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » 3.2m5 "os x" plugin dir?
3.2m5 "os x" plugin dir? [message #444813] Tue, 21 February 2006 15:04 Go to next message
scb  is currently offline scb Friend
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 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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


Previous Topic:How to open another view from a customized View class?
Next Topic:"merging" plugins
Goto Forum:
  


Current Time: Mon Nov 04 21:24:25 GMT 2024

Powered by FUDForum. Page generated in 0.06728 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top