Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » access resources
access resources [message #286458] Fri, 10 June 2005 08:10 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:3.1 - IExtensions.getExtensions() problem
Next Topic:Welcome Page Standby Problem
Goto Forum:
  


Current Time: Thu May 08 04:10:05 EDT 2025

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

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

Back to the top