2 Replies Latest reply on Feb 26, 2008 3:44 PM by tom_goring

    Application path

    marx3

      I would like to put in EAR some text files and I want to parse them later from application. The problem is how to get to them?


      I've read about ResourceLoader etc, but they read only resource files. What I need is to read plain text file placed somewhere in EAR file.

        • 1. Re: Application path
          marx3

          ok, ResourceLocator did that, i've forgot to modify build.xml to copy my plain text files.

          • 2. Re: Application path
            tom_goring

            There are many ways but this would do...




            InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("seam.quartz.properties");
            



            And this file would live in the root of one of your jar files.


            E.g.


            ~/java/jboss-4.2.2.GA/server/default/deploy/S2JNET.ear/S2JNET.jar/seam.quartz.properties