This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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