|
Re: Absolute path from getInstallURL() [message #145982 is a reply to message #145692] |
Fri, 17 October 2003 20:06 |
Eclipse User |
|
|
|
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
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03468 seconds