Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Absolute path from getInstallURL()
Absolute path from getInstallURL() [message #145692] Fri, 17 October 2003 13:42 Go to next message
Neil Sanderson is currently offline Neil SandersonFriend
Messages: 3
Registered: July 2009
Junior Member
Hi, can anybody help me...

I'm trying to get the absolute file system path from which my plugin is
loaded by eclipse.

Here's what i've tried so far...

getClass().getName();
getDescriptor().getPluginClassLoader().getResource(getClass( ).getName()));
Platform.getLocation();
getDescriptor().getInstallURL();
getDescriptor().getInstallURL().getFile();
getDescriptor().getInstallURL().toExternalForm();
getDescriptor().getInstallURL().getPath();
getDescriptor().getInstallURL().getRef();
(new File(getDescriptor().getInstallURL().getFile())).getAbsolute Path());
new URI(getDescriptor().getInstallURL().getFile());
(new File((new
URI(getDescriptor().getInstallURL().getFile()).getRawPath()) )).getAbsolutePath());

None of this gives me the right answer. Am i missing something very
obvious??

Thanks
Re: Absolute path from getInstallURL() [message #145982 is a reply to message #145692] Fri, 17 October 2003 20:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

Look at Platform.resolve(URL).
--

Neil Sanderson wrote:
> Hi, can anybody help me...
>
> I'm trying to get the absolute file system path from which my plugin is
> loaded by eclipse.
>
> Here's what i've tried so far...
>
> getClass().getName();
> getDescriptor().getPluginClassLoader().getResource(getClass( ).getName()));
> Platform.getLocation();
> getDescriptor().getInstallURL();
> getDescriptor().getInstallURL().getFile();
> getDescriptor().getInstallURL().toExternalForm();
> getDescriptor().getInstallURL().getPath();
> getDescriptor().getInstallURL().getRef();
> (new File(getDescriptor().getInstallURL().getFile())).getAbsolute Path());
> new URI(getDescriptor().getInstallURL().getFile());
> (new File((new
> URI(getDescriptor().getInstallURL().getFile()).getRawPath()) )).getAbsolutePath());
>
> None of this gives me the right answer. Am i missing something very
> obvious??
>
> Thanks
>
Re: Absolute path from getInstallURL() [message #146518 is a reply to message #145982] Mon, 20 October 2003 12:26 Go to previous message
Neil Sanderson is currently offline Neil SandersonFriend
Messages: 3
Registered: July 2009
Junior Member
Thanks John...that's perfect.

John Arthorne wrote:

> Look at Platform.resolve(URL).
> --

> Neil Sanderson wrote:
> > Hi, can anybody help me...
> >
> > I'm trying to get the absolute file system path from which my plugin is
> > loaded by eclipse.
> >
> > Here's what i've tried so far...
> >
> > getClass().getName();
> > getDescriptor().getPluginClassLoader().getResource(getClass( ).getName()));
> > Platform.getLocation();
> > getDescriptor().getInstallURL();
> > getDescriptor().getInstallURL().getFile();
> > getDescriptor().getInstallURL().toExternalForm();
> > getDescriptor().getInstallURL().getPath();
> > getDescriptor().getInstallURL().getRef();
> > (new File(getDescriptor().getInstallURL().getFile())).getAbsolute Path());
> > new URI(getDescriptor().getInstallURL().getFile());
> > (new File((new
> >
URI(getDescriptor().getInstallURL().getFile()).getRawPath()) )).getAbsolutePath());
> >
> > None of this gives me the right answer. Am i missing something very
> > obvious??
> >
> > Thanks
> >
Previous Topic:Eclipse dependency graph tool?
Next Topic:Missing entry
Goto Forum:
  


Current Time: Sat Nov 09 03:59:38 GMT 2024

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

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

Back to the top