• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using System properties or new Properties object?  RSS feed

 
Gaurav Kr. Arora
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am aware of two ways to read a .properties file:

1- System.getProperties.load(Inputstream for .properties file);

2- Creating a new Properties object and then calling load(Inputstream for .properties file);

In first approach, are we going to store values of .properties file in the System object. Is it utilizing more resources?

Would like to know which is the best way to do it or apart from above two ways, if there is any other best way, please let me know.

Thanks,
Vineet
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too difficult for "beginning". Moving discussion.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!