File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 685
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.
It is sorta covered in the JavaRanch Style Guide.
subject: accessing properties file
Similar Threads
yahoo mail, gmail setup in my web application
JavaMail error
isELIgnored attribute
how to show contents of a .properties file in a JSP?
[TGIF] Hug a developer today