Shipping jar with default .properties file configurations
Posted
by Maxim Veksler
on Stack Overflow
See other posts from Stack Overflow
or by Maxim Veksler
Published on 2010-04-08T10:47:05Z
Indexed on
2010/04/08
10:53 UTC
Read the original article
Hit count: 261
Hello,
I would like to include a default default.properties file in my .jar library. The idea is to allow the user to override my default is he so desires.
I'm having trouble getting the classloader to play nicely with this setup, I've tried to look a at popular jars such as log4j, common-* and others and it seems that no one is implementing this idea. Am I going the wrong way?
The second best thing is hard coding the values, and using the default if no .properties key has been found, but this sound oh so wrong.
Suggestions?
© Stack Overflow or respective owner