1 Reply Latest reply on Jun 17, 2008 1:12 PM by peterj

    Real Path of ear deployment

    sankul123

      Hi ALL,

      I want to know how to get the real path of a deployed ear file in jboss.
      I know how to get the real path of a deployed war file , but I want it for ear file.

      I want to access a file which is directly under root of ear.

      myApp.ear
      |----------version.xml [how to access this file to do File operations?]
      |
      |
      |----------web1.war
      |
      |----------web2.war
      



      Sandeep

        • 1. Re: Real Path of ear deployment
          peterj

          You can do this:

          String serverDir= System.getProperty("jboss.server.home.dir");
          String earDir = deployDir + "/deploy/" + "myApp.ear";


          Yes, this means you need to hard-code the name of the deploy directory and the name of the ear file (or read it from a properties file somewhere).