File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to add key to 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 add key to windows registry??" Watch "How to add key to windows registry??" New topic
Author

How to add key to windows registry??

Supun Lakshan Dissanayake
Ranch Hand

Joined: Oct 26, 2012
Posts: 132

I want to read or write registry key to windows registry using a java programme.
registry key is like "HKEY_LOCAL_MACHINE\SOFTWARE\KasperskyLab\protected\AVP12" // this registry key is a SAMPLE
How to do it?

Regards!!


Are you better than me? Then please show me my mistakes..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41820
    
  62
The http://www.coderanch.com/how-to/java/JavaIoFaq links to the solution.


Ping & DNS - my free Android networking tools app
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2850
    
  11

I've never used it myself, but I believe the Java API class java.util.prefs.Preferences uses the Windows registry as its store when running on Windows. Its abilities to read and write registry keys would be limited, but depending on your requirements might be enough. If you need more flexibility, then you'll need to write (or find to download) a JNI interface for this job. Here another thread that might point you in the right direction: http://www.coderanch.com/t/517229/java/java/Editing-reading-windows-registry-java
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to add key to windows registry??