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

accessing properties file

 
emmanuel raj
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a properties file inside a jar file which is in turn present inside an ear file . Can anyone please tell me how to access this properties file from an application outside the ear file .

Thanks

[ August 29, 2008: Message edited by: emmanuel raj ]
[ August 29, 2008: Message edited by: emmanuel raj ]
 
Norm Radder
Rancher
Posts: 1219
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the jar file into a byte array and then wrap that with your custom File class and use JarFile with that class.
 
Ove Lindström
Ranch Hand
Posts: 326
Android Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the resource-loader.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic