1 Reply Latest reply on Dec 26, 2007 2:20 PM by Peter Johnson

    extracted ear/war/jar file location

    shimi Newbie

      How can I find out in runtime where JBoss extracted my ear/war/jar file?
      I have a file inside my ear/war/jar file and I need to know the location of the file. I know that it is in the tmp/deploy directory but I need the exact application temporary name.

        • 1. Re: extracted ear/war/jar file location
          Peter Johnson Master

          Try loading a class or properties file as a resource, then look at the path for the resource. That should get you the information you need.

          I think this code will work (substituting the class names with classes in your app):

          Class class1 = ClassInApp.class;
          URL url = class1.getResource("ClassInApp.class");
          String s = url.toString();

          The string 's' should contain the full path to the class file, which contains the tmp/deploy directory.