This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes accessing properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "accessing properties file" Watch "accessing properties file" New topic

accessing properties file

emmanuel raj
Ranch Hand

Joined: Jan 10, 2007
Posts: 89
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 .


[ August 29, 2008: Message edited by: emmanuel raj ]
[ August 29, 2008: Message edited by: emmanuel raj ]

SCJP 1.4,SCWCD,SCMAD,ITIL V3 ***** "I am not afraid of a fighter who knows 10000 different kicks , but am afraid of a fighter who has mastered one kick 10000 times" - BRUCE LEE
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 691
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

Joined: Mar 10, 2008
Posts: 326

Use the resource-loader.
Have you checked out Aspose?
subject: accessing properties file
It's not a secret anymore!