aspose file tools*
The moose likes Java in General and the fly likes How to access the windows registry Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to access the windows registry" Watch "How to access the windows registry" New topic
Author

How to access the windows registry

Garry Kalra
Ranch Hand

Joined: May 25, 2001
Posts: 111
Can i access and make changes to the windows registry using java.
garry
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
As far as I know, you'll have to write some native code to access platform specific features.
But if you can write a dynamic library (dll) that accesses the Windows registry you can declare a native method in your Java code and access that method after loading the library with the System object.
Hope this helps


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Steve Deadsea
Ranch Hand

Joined: Dec 03, 2001
Posts: 125
This work of writing native code to access the windows registry has of course already been done by various parties.
Microsoft has libraries to do so in the com.ms.wfc package. http://msdn.microsoft.com/visualj/technical/tutorial/wfcregistry/default.asp
However you only get those with J++ and I have no idea if you can legally get them elsewhere and redistribute them or not.
There is a products called JNDI that looks like it can do it:
http://www.cogentlogic.com/cocoon/CogentLogicCorporation/JNDI.xml
It also appears that the Java 1.4 preferences API can look into the Windows registry, here is an example:
http://www.esus.com/javaindex/j2se/jdk1.2/javautil/preferences/prefsaccessregistry.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access the windows registry