Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Locate Eclipse executable at runtime?
Locate Eclipse executable at runtime? [message #336106] Thu, 21 May 2009 14:22 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:specifying location of a new group to be added the file menu
Next Topic:reverse/undo dirty state in an editor?
Goto Forum:
  


Current Time: Fri Mar 29 12:40:14 GMT 2024

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

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

Back to the top