Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Absolute path from getInstallURL()
Absolute path from getInstallURL() [message #145692] Fri, 17 October 2003 09:42 Go to next message
Eclipse UserFriend
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 16: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 08:26 Go to previous message
Eclipse UserFriend
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 May 10 05:56:01 EDT 2025

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

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

Back to the top