I have a java program which uses an external jar file. The jar file has some variables(IP addresses) that needs to be read from a configuration file.
How to I create one such configuration file? How to do I read it in jar? [For now, I have hard-coded the needed variables data in the jar file. But I want to change it as and when I like, so changing in the configuration file is easier and I need not export(or re-compile) my jar file always]
To be more clear:
I have two java files: A.java, B.java. "A.java" is to be exported as a jar file and used by "B.java".
Now, I have to read some data(settings, IP addresses) within A.java. All these sort of data have to kept in a separate file and should be read into A.java. After enabling this, A.java will be exported as a jar file and used by B.java.
How could this be achieved?