Design advice for writing an interface in java
<p>I am new to java but I am actually liking it because, believe it or not, it is improving the way I code. (I guess because it forces you to write the code OO way)</p>

<p>Anyways, I am writing a java library which looks like this. On the base there is core library and then some toolkits built on top of it.</p>

<p>Now all the toolkits have part of code in common.</p>

<p>For example, reading the config file for that toolkit.
Example: toolkitA/config/config.cfg</p>

<pre><code>config.cfg
inputDir = /path/to/input
outputDir = /path/to/output



toolkitB/config/config.cfg

config.cfg
inputDir = /path/to/input
// no output here.. maybe this toolkit is just to analyze the input
</code></pre>

<p>The issue is.. alot of these configs are unknown as I am still in process of creating a toolkit and even I dont know what toolkit will be there in future.</p>

<p>As of now, the code flow is as follows.</p>

<pre><code> main--&gt; readconfig--&gt;parseconfig--&gt; execute the source code with params. 
  parsed from the source parseconfig
</code></pre>

<p>My key question is as these config files are in the toolkits level, these config doesnt connects at all with the source code library. The core library is oblivious of the fact that these parameters are actually set up by user in config file. Now... maybe its because of java but I find this very superficial.
What I would want is something like this</p>

<pre><code>  main--&gt; a core config file setter which reads and parses this tool kit config file --&gt; 
  the core library then interacts with these  objects rather than the superficial level.
</code></pre>

<p>How do I achieve this.</p>

<p>(being an avid stackoverflow user.. I know.. its not really "error" related question but I dont know what to search also or how to set such config stuff.. all i have is the idea on how I want this thing to be implemented.. :( )</p>
