Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resource Loading from Container Apps

 
Charley Watson
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for knowledge pointers on how to load a resource as stream from within a 2.0 compliant application. My utility class needs file resources that are/will be included in the root of a jar. Any help with this process is greatly appreciated.

My environment: JBoss 4.XX on WinXP,Linux...

Thanks,

CW
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Charley,

Here there is a piece of code that loads an xml stream at runtime:

There is one more side of the story: you need to understand your container class loader architecture in order to play with this code safely.
Regards.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic