title: Accessing HKEY_CURRENT_USER via Preferences in Java
body: <p>I am trying to write a registry key in the following path in the registry:</p>
  
  <p>HKEY_CURRENT_USER -> Software -> TestApp</p>
  
  <p>I am currently doing:</p>
  
  <pre><code>    public static void main(String[] args)
  {
  
      Preferences p = Preferences.userRoot().node("/HKEY_CURRENT_USER/Software/TestApp");
      p.put("TestKey", "TestValue");
  }
  </code></pre>
  
  <p>But it writes it at HKEY_CURRENT_USER -> Software -> JavaSoft -> Prefs -> /H/K/E/Y_/C/U/R/R/E/N/T/_/U/S/E/R -> Software -> Test/App</p>
  
  <p>How do I get it to follow the absolute path, and why is it putting extra slashes in?</p>