Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   How to read a registry key from Windows registry ? (http://www.velocityreviews.com/forums/t140576-how-to-read-a-registry-key-from-windows-registry.html)

Leny 01-31-2005 02:27 PM

How to read a registry key from Windows registry ?
 
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





Thomas Weidenfeller 01-31-2005 02:30 PM

Re: How to read a registry key from Windows registry ?
 
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

Real Gagnon 02-01-2005 02:03 AM

Re: How to read a registry key from Windows registry ?
 
>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

Daniel 02-01-2005 07:54 AM

Re: How to read a registry key from Windows registry ?
 
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
>
>
>




All times are GMT. The time now is 04:14 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.