• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

How to access the windows registry

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can i access and make changes to the windows registry using java.
garry
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic