aspose file tools
The moose likes Java in General and the fly likes Preferences object calls junks directories Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Preferences object calls junks directories" Watch "Preferences object calls junks directories" New topic
Author

Preferences object calls junks directories

Vinaya Thimmappa Kumar
Greenhorn

Joined: Oct 12, 2005
Posts: 1
I am using Prefernces object and creates junk directories under
/etc/.java/.systemPrefs

ls /etc/.java/.systemPrefs/
> > > .system.lock
> > > .systemRootModFile
> > > _!':!bw"t!#4!a!"w!#4!bw"2


my java code is

> > > -----------------
> > > import java.util.prefs.*;
> > >
> > > class Pref
> > > {
> > > static public void main (final String[] args)
> > > {
> > > String prefsStr = new String ("machine/domain");
> > > Preferences prefs = Preferences.userRoot ();
> > > prefs = prefs.node (prefsStr);
> > > prefs.putInt ("Variant", 1);
> > > try {prefs.flush ();}
> > > catch (BackingStoreException ex)
> > > {
> > > System.out.println ("Flush Exception " + ex);
> > > }
> > > }
> > > }
> > >

I am not sure why systempref is getting created... , if i am not using
system methods,then y is sytempref getting created ?

has anyone seen this before
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
Why do you care?
The whole idea of java.util.Preferences is to isolate you (the developer) from these kind of implementation details. If you really really want to care, simply look at the source for your distribution. I'm sure the answer lies therein.


Tony Morris
Java Q&A (FAQ, Trivia)
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Preferences object calls junks directories
 
Similar Threads
Preferences.removeNode() doesn't actually remove the preference node
Portlet Preferences not loading , portlet does not populate table values.
JDK1.4 Could not lock System prefs
Java 1.4 Preference API question: NOT for Developer's certification
Code setup to use WebSphere APIs