You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Thanh T." <co...@gmail.com> on 2006/02/27 22:30:54 UTC

Loading properties file

Hi All,
Am trying to load multiple properties file in to one property object.
I have two properties file located at different place
(tokenize.properties and project.properties) and I am not sure how to
load those two properties into one single property object. Here's what
I mean.

      // Load a single property file
      ClassLoader cl = this.getClass().getClassLoader();
      InputStream is = cl.getResourceAsStream( "/tokenize.properties" );
      inputProperties = new Properties();

      try {
         inputProperties.load(is);
      }
      catch ( IOException ex ){  ex.printStackTrace();  }

If I create another property object then each property file will load
to each property object, this is so inconvenience. Thanks

--
Thanh T.ICQ #: 10381946

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Loading properties file

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 2/27/06, Thanh T. <co...@gmail.com> wrote:

> (tokenize.properties and project.properties) and I am not sure how to
> load those two properties into one single property object. Here's what

putAll

--
Whenever you find yourself on the side of the
majority, it is time to pause and reflect.
(Mark Twain)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org