hi everyone..
i have been trying to experiment with the new Preferences API running under Solaris 5.8. the technical article that i found on the Sun site was oriented towards Windows - but after reviewing the JDK dox and Almanac examples - it appears as though this API is OS neutral.
when i attempt to run my example code (see below) i get the following error.
>>
Jan 3, 2003 12:00:32 PM java.util.prefs.FileSystemPreferences$3 run
WARNING: Could not create system preferences directory. System preferences are unusable.
<<
has anyone worked with this API under Solaris?
thank you for any help or guidance.
mark
Example code that produces the error above.
import java.util.prefs.*;
public class Pref2 {
public static void main (String args[]){
Preferences prefs = Preferences.userRoot().node("/users/mark/stuff");
// Get the parent
Preferences node = prefs.parent(); // /java
node = node.parent(); // null
// Get the names for nodes under java.lang
String[] names = null;
try {
names = prefs.childrenNames();
} catch (BackingStoreException e) {
}
// Get the child nodes using the names
for (int i=0; i<names.length; i++) {
node = prefs.node(names[i]);
}
}
}
Please see java version and OS version info below.
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
____________________________________________________To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
Be respectful! Clean up your posts before replying
____________________________________________________