Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to read a registry key from Windows registry ?

Reply
Thread Tools

How to read a registry key from Windows registry ?

 
 
Leny
Guest
Posts: n/a
 
      01-31-2005
Hi,

I need to read a registry in Windows and I wonder if anyone has faced
this before.

Right now the most simple way as I see it is to write a method in C and
invoke it via. JNI. Have you faced this before ? Do you know if is there any
available library to do this ?

Thanks in advance,

- Leny




 
Reply With Quote
 
 
 
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      01-31-2005
Leny wrote:
> I need to read a registry in Windows and I wonder if anyone has faced
> this before.
>
> Right now the most simple way as I see it is to write a method in C and
> invoke it via. JNI.


That or e.g. use an appropriate JNDI service provider:

http://java.sun.com/products/jndi/serviceproviders.html

> Have you faced this before ? Do you know if is there any
> available library to do this ?


How did your Google search turn out?

/Thomas

--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/...g/java/gui/faq
 
Reply With Quote
 
 
 
 
Real Gagnon
Guest
Posts: n/a
 
      02-01-2005
>I need to read a registry in Windows and I wonder if anyone has
>faced this before.


An easy way is to launch the REG.EXE utility and capture the output :
http://www.rgagnon.com/javadetails/java-0480.html

Bye.
--
Real Gagnon from Quebec, Canada
* Looking for Java or PB snippets ? Visit Real's How-to
* http://www.rgagnon.com/howto.html
 
Reply With Quote
 
Daniel
Guest
Posts: n/a
 
      02-01-2005
This is a rather new problem for me as well so i don't know if this
works in your specific situation. but java.util.prefs.*
Look at the api-spec and look at this link:
http://www.javaworld.com/javaworld/j...eferences.html

The nice thing with this is that your app remains portable.
hope it helps

/daniel


>Hi,
>
> I need to read a registry in Windows and I wonder if anyone has faced
>this before.
>
> Right now the most simple way as I see it is to write a method in C and
>invoke it via. JNI. Have you faced this before ? Do you know if is there any
>available library to do this ?
>
>Thanks in advance,
>
> - Leny
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Registry key not being read Henry Fleming ASP .Net 2 09-01-2004 03:47 AM
Replace Tab Key to Return Key (Enter Key) from Web Forms? M P ASP General 1 08-06-2004 08:32 AM
Intermittent failure to read registry key in ASP.NET application... akhare1 ASP .Net 4 08-01-2004 02:37 AM
Reading registry key throws "Requested registry access is not allowed." HK ASP .Net 1 04-01-2004 04:44 PM



Advertisments