access resources [message #286458] |
Fri, 10 June 2005 08:10  |
Eclipse User |
|
|
|
Hi,
Currently I acces any Resource via
getClass().getResource(...)
mainly for some images. But the drawback of this is duplication of those
images if I need them in different packages. Is there another way of
getting resources? For example I have an icons folder within the src,
where the icons reside that are used for view extensions in the app. Can
I access that folder somehow from within a class ?
Andreas
|
|
|
Re: access resources [message #286463 is a reply to message #286458] |
Fri, 10 June 2005 09:47  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
They don't need to be relative to the class, they just need to in the
classpath. If relative to the classpath root, use "/..." The leading
slash indicates that it should not look in the package of the class, but
instead start from the root of the classpath.
Andreas Pakulat wrote:
> Hi,
>
> Currently I acces any Resource via
>
> getClass().getResource(...)
>
> mainly for some images. But the drawback of this is duplication of those
> images if I need them in different packages. Is there another way of
> getting resources? For example I have an icons folder within the src,
> where the icons reside that are used for view extensions in the app. Can
> I access that folder somehow from within a class ?
>
> Andreas
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.04855 seconds