1 Reply Latest reply on Oct 10, 2003 2:39 AM by micke

    location of property files within .ear

    andy999 Newbie

      Hi

      I just wanted to know where you put property files within a .ear so that classes can use it. At present I have a property file in the same directory as the class that uses it, but it can't seem to find it during runtime.

      thanks in advance for any help

      regards
      andy

        • 1. Re: location of property files within .ear
          micke Novice

          You need a valid context to be able to load the file
          within the ear (...getResource("/path/propfile").

          But you are probably better off not including the prop file in the ear since you dont want to build a new ear if you are changing the file.

          You can load the prop file from any location as long as it is in the classpath ( for instance : this.getClass().getResourceAsStream("/propfile"))

          /micke