UpperCase letter in Preferences API

101 Views Asked by At

In the Preferences API provided by JDK. It appears that each upper case letter written into the windows registry by the API is preceded by a '/' character. e.g if the Node name is TestNode it will appear as Test/Node.How can i overcome this?

Preferences pre = Preferences.userRoot();
Preferences child = pre.node("TestNode");

It will be created as Test/Node in registry,which causes problem in readability and locating the node in the tree,if many nodes are present having Uppercase names.

1

There are 1 best solutions below

2
On

Why dont you just remove that?

String result = "Test/Node".replaceAll("/", "");