• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I read a file from the META-INF directory?  RSS feed

 
Walter Chen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an EJB project which is packaged into a jar, which is in turn packaged into an EAR file. I have a customized xml file which I put under the META-INF directory, but how do I open it in my java code?

Thanks,
Walter
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37181
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Walter,
It is traditional to put all custom files in a separate directory for property files and put that directory in your classpath.

The META-INF folder is part of the J2EE directory structure. Putting other files there - that won't be used by the application server - is like overloading its purpose.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!