This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Unix Error Code Solution.....maybe? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Unix Error Code Solution.....maybe?" Watch "Unix Error Code Solution.....maybe?" New topic
Author

Unix Error Code Solution.....maybe?

Chris Bellezza
Greenhorn

Joined: Apr 14, 2007
Posts: 2
After checking out Bug 4673298 at:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4673298

and verifying that I was indeed running version 1.4
I was ultimately led to a page that might have a proposed solution:

http://allaboutbalance.com/articles/disableprefs/

There is a great deal of info about the bug it seems here but a synopsis of the solution is as follows:


"In the JavaDoc for java.util.prefs.Preferences he points out that if you implement your own preferences subsystem, you can specify it with this argument:

-Djava.util.prefs.PreferencesFactory=<a class that implements PreferencesFactory>

And therein lies the solution: implement your own preferences classes that do nothing. Sounds hard? Thankfully, AbstractPreferences does most of what you want. You have to write 3 lines of code - a constructor for your new class. I've done that for you. And I've outlined the solution in a two-step process:

Download DisabledPreferences.java and DisabledPreferencesFactory.java, and add them to your implementation.

When you start your JVM, supply this argument (make sure that if you put it in a package, you qualify the class name):
-Djava.util.prefs.PreferencesFactory=DisabledPreferencesFactory
The next time you start an application, my DisabledPreferences will kick in."


Unfortunately, I do not understand exactly what this trying to tell me to do, or even if it is a valid solution to my problem. Are the programs mentioned (DisabledPreferences.java/DisabledPreferencesFactory.java) supposed to be incorported into code that I write myself? Or are they supposed to be added to some java system source code somewhere?

Okay...I've been lookin' at Java stuff for four hours. I'm gettin' some hot chocolate and then going for a run. Again, many thanks to all who've helped out.

-Chris
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

I'm glad it looks promising! Let us know what happens.

(When replying to a post, please use the "Post Reply" button instead of the "Post New Topic" button. )


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
Consider Paul's rocket mass heater.
 
subject: Unix Error Code Solution.....maybe?
 
Similar Threads
java lang out of memeory error..Pls Help!!!!
private Inner Class and the extra file
Problems with Ant 1.7.0 if it is located on remote computer
Javadoc problem with generics
Calendar in Java 1.5 and 1.3