You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Kai Schlamp <sc...@gmx.de> on 2010/05/01 12:37:55 UTC

Re: ResourceAccessException by using getResourceFilePath in Eclipse Plug-In

Hy Tong.
Yes, that is where the problem lies. When running an Eclipse plugin (or also
OSGi bundle) a call to
myObject.class.getClassLoader().getResource("sample.dat").toURI() does not
return the direct file path ("file:..."), but a bundle resource
("bundleresource:..."). There was once a bug report on Eclipse to change that,
but the report was declared as invalid
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=65673). This is because it seems
that it is not specified by the Java platform that getResource must return a
"file" resource.