Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Java Preferences system node in Windows (Updated)(How do I coax Windows 10 to let me read/write the system node to the Windows registry?)
Java Preferences system node in Windows (Updated) [message #1795893] Tue, 02 October 2018 03:46 Go to next message
Reinhardt Christiansen is currently offline Reinhardt ChristiansenFriend
Messages: 73
Registered: March 2010
Member
Updated....

I'm back working on Java for the first time in quite a while - several years - and I'm having some problems with an old program that uses Java Preferences.

My program is looking for the system node for Preferences and, if not found, it wants to write some defaults to that node. I get authorization errors from Windows when I try to read or write the system node. (I can read or write a user node just fine.)

The only way I've been able to read and write the system node is if I run my program in a command prompt as an administrator. While that is workable for testing, it's not very convenient. I'm trying to develop in Eclipse and I'd like to be able to run/debug my program there without having to invoke a command prompt. Also, I ultimately want to be able to run my program on the desktop, most likely from a jar.

My problem apparently stems from changes made in Windows UAC back when Vista came out. I wrote the program on an XP machine and hadn't executed it on a later Windows until the other day, which explains why this hasn't bitten me sooner.

I imagine Java developers have long ago developed strategies for dealing with this situation. I hope someone can share those strategies with me. I'd be grateful if you can help!

Update:
I've had this post up for two or three days and nearly 900 people have viewed it but no one has said a single word about my issue. I'm trying to understand why. I'm sure people are busy and don't want to jump in unless they know something about this issue which is fine. But I think of Preferences as something that most people will use and know something about. Are people not using the Preference classes any more to store and get Preferences? If there's another (better?) way to store preferences, I'm fine with that. I'm definitely open to the idea of handling Preferences differently. As I said at the beginning of this post, I've been away from Java for a while and other techniques may have evolved in the meantime.

So let me open this up. I'd like to have a default set of Preferences that is obtained from *somewhere* and I'd like each user to be able to store and then change those preferences at will. How would YOU accomplish that if your program required it?

I'm game to write it to an external database or use XML or any of a number of different approaches.

I *thought* the Preferences classes would be most peoples' first choice and posted here to find out how people used the system node in a Windows environment - in other words, how did they gain access to the system node when testing in Eclipse and then executing the tested program in a jar or other environments - but if the Preference classes are NOT the way most people do things, please tell me at least one way that people ARE using.

[Updated on: Thu, 04 October 2018 20:18]

Report message to a moderator

Re: Java Preferences system node in Windows (Updated) [message #1796326 is a reply to message #1795893] Wed, 10 October 2018 16:11 Go to previous messageGo to next message
Jay Arthanareeswaran is currently offline Jay ArthanareeswaranFriend
Messages: 128
Registered: July 2009
Senior Member
Hi Reinhardt ChristiansenFriend,

Probably nobody responded because none of the JDT users/developers might know about the issue you are talking about. JDT is not about general Java programming using Eclipse, the specific Eclipse component that includes the compiler and the associated components.

I would expect the same question to get more response in StackOverflow or similar forum.

Jay
Re: Java Preferences system node in Windows (Updated) [message #1796707 is a reply to message #1796326] Wed, 17 October 2018 22:41 Go to previous message
Reinhardt Christiansen is currently offline Reinhardt ChristiansenFriend
Messages: 73
Registered: March 2010
Member
A belated thank you for your reply, which I am just seeing now. I had already tried StackExchange but didn't get a terribly helpful answer. I'm going to have to find another forum to ask my question, I suppose....

Thanks again.
Previous Topic:Launch default in Eclipse IDE
Next Topic:Get method calls of IMethod through eclipse CallHierarchy
Goto Forum:
  


Current Time: Tue Apr 23 17:11:48 GMT 2024

Powered by FUDForum. Page generated in 0.03142 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top