import java.util.prefs.Preferences;
publicclass Main {
publicstaticvoid main(String[] argv) throws Exception {
// Get the system root
Preferences prefs = Preferences.systemRoot();
// Get the user root
prefs = Preferences.userRoot();
// The name of a root is ""
String name = prefs.name();
// The parent of a root is null
Preferences parent = prefs.parent();
// The absolute path of a root is "/"
String path = prefs.absolutePath();
}
}