This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
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

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

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

How to add key to windows registry??

Supun Lakshan Dissanayake
Ranch Hand

Joined: Oct 26, 2012
Posts: 133

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?


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

Joined: Mar 22, 2005
Posts: 42954
The links to the solution.
Greg Charles

Joined: Oct 01, 2001
Posts: 2867

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:
I agree. Here's the link:
subject: How to add key to windows registry??