Locate Eclipse executable at runtime? [message #336106] |
Thu, 21 May 2009 14:22 |
Eclipse User |
|
|
|
Originally posted by: mike.xmos.com
Hi,
Is there a way to locate the root directory of an eclipse installation?
I'm thinking that if you can locate a bundle's path then you can
extrapolate the launcher path (in a normal installation) by doing
something like:
IPath bundlePath = new
Path(FileLocator.getBundleFile(getBundle()).getCanonicalPath ());
IPath launcherPath = bundlePath.uptoSegment(bundlePath.segmentCount() - 2);
which is horrible! Is there another way?
Mike
|
|
|
Re: Locate Eclipse executable at runtime? [message #336107 is a reply to message #336106] |
Thu, 21 May 2009 14:32 |
Eclipse User |
|
|
|
Originally posted by: subs._nospam_consertum.com
Mike Wrighton wrote:
> Hi,
>
> Is there a way to locate the root directory of an eclipse installation?
> I'm thinking that if you can locate a bundle's path then you can
> extrapolate the launcher path (in a normal installation) by doing
> something like:
>
> IPath bundlePath = new
> Path(FileLocator.getBundleFile(getBundle()).getCanonicalPath ());
> IPath launcherPath = bundlePath.uptoSegment(bundlePath.segmentCount() - 2);
>
> which is horrible! Is there another way?
>
> Mike
How about
Location eclipseLoc = Platform.getInstallLocation();
URL eclipseBase = eclipseLoc.getURL();
--
Derek
|
|
|
Powered by
FUDForum. Page generated in 0.03155 seconds