Results 1 to 2 of 2
- 06-08-2012, 07:18 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 32
- Rep Power
- 0
Better way to load resources from resource-only package
Hello,
I've got a package, res, which is said to contain all the resources of my application. To easily load them, I have a class inside that package, with only this code:
Then what I do to load resources from any other class is:Java Code:package res; public abstract class ResLoader { }
Am I wrong or there is a better way to do this?Java Code:ResLoader.class.getResource(resourceName);
- 06-08-2012, 08:11 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,408
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
could not load load from location:/test_subreport.jasper
By jadeite100 in forum JavaServer Faces (JSF)Replies: 1Last Post: 03-27-2012, 11:43 AM -
Compiler runtime package load error
By Dark-Redd in forum Advanced JavaReplies: 17Last Post: 10-09-2011, 09:21 AM -
Resources load in Eclipse but not in standalone .jar
By leonsbuddydave in forum New To JavaReplies: 0Last Post: 01-14-2011, 05:07 AM -
Getting included resources while getting resource stream
By nsarun in forum Advanced JavaReplies: 1Last Post: 12-21-2010, 01:42 AM -
Ant problem:Could not load definitions from resource org/apache/tools/ant/antlib.xml
By jayyu317 in forum New To JavaReplies: 0Last Post: 03-22-2010, 02:58 AM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks