Get the Windows ProductID via registry, in JAVA
<p>How do I get the Windows ProductID via registry in Java? The only way I tried is via:</p>

<pre><code>    Process p = Runtime.getRuntime().exec("reg query \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" /v ProductId");
</code></pre>

<p>which returns null or error.</p>

<p>Thanks in advance.</p>
