How to get access to hostfile on different machines(WIndows,linux etc) using Java
<p>Hi I am trying to parse host files kept at different locations on different machines. Plz help me in getting access to host files assuming i can have all types of machines(Windows,linux,mac etc). I want a complete method in java that parses hostfile irrepective of the underlying system.</p>

<p>Till now i was hardcoding the location of hostfile in windows :</p>

<pre><code>private final String mHostFileLocation =
                    "C:\\WINDOWS\\system32\\drivers\\etc\\hosts";
</code></pre>

<p>but I think this is a bad idea. Please let me know how I can parse the host file on any system.</p>
