Thread View: borland.public.jbuilder.java.api
1 messages
1 total messages
Started by Adam Gawne-Cain
Fri, 19 Sep 2003 06:22
java.util.prefs building "pyramids"
Author: Adam Gawne-Cain
Date: Fri, 19 Sep 2003 06:22
Date: Fri, 19 Sep 2003 06:22
41 lines
2085 bytes
2085 bytes
Hi all, I am using java.util.prefs.Preferences In the Windows JVM this is backed by the Win32 Registry. My problem is that sometimes when I create a node like "12345678" I get a series of keys in the Win32 registry as follows: 1 12 123 1234 12345 123456 1234567 12345678 All of the keys are at the same level, with the correct parent, and empty. This problem is intermittent. My users have seen it happen in Win2000 and NT4. It has happened with JRE 1.4.1 and JRE1.4.2. More info: since it is quite likely that users will be running several instances of my programs on one machine (ie different JVMs are accessing the Win32 registry simultaneously), I have coded my calls to java.util.prefs.Preferences with the sync() method just before reading keys, and the flush() method just after writing keys. However, the problem occurs when only one JVM is operating. I guess that this is a JRE/Win32 bug, but I would like to know a safe work-around. (Is the problem using digits in the key name, or using flush()/sync()?) Has anyone else seen a similar bug? Can anyone confirm that this is a JRE/Win32 bug? Does anyone know a work around? Thanks in advance, Adam.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads