I am trying to write a registry key in the following path in the registry:
HKEY_CURRENT_USER -> Software -> TestApp
I am currently doing:
public static void main(String[] args)
{
Preferences p = Preferences.userRoot().node("/HKEY_CURRENT_USER/Software/TestApp");
p.put("TestKey", "TestValue");
}
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
How do I get it to follow the absolute path, and why is it putting extra slashes in?