windows registry
2 posts in topic
Flat View  Flat View

Posted By:   prajith_pv
Posted On:   Thursday, July 15, 2004 11:43 PM

how to access entries in windows registry from java. (Anybody will have code samples)

Re: windows registry

Posted By:   Anonymous  
Posted On:   Friday, October 8, 2004 01:24 PM

The easiest to use, most complete and elegant API I know of is made by LatteLib (http://www.lattelib.com). If you use it your code will look something like this:

Registry registry = new Registry();

registry.setStringValue("HKEY_LOCAL_MACHINE/Software/MyApp", "color", "red");
String color = registry.get("HKEY_LOCAL_MACHINE/Software/MyApp", "color");

registry.setStringValue("HKEY_LOCAL_MACHINE/Software/MyApp", "path", "%PATH%;C:\MyApp\bin");
String expanded registry.getExpandedValue("HKEY_LOCAL_MACHINE/Software/MyApp", "path");

if (!registry.keyExists("HKEY_LOCAL_MACHINE/Software/MyApp")) {

String[] subkeys = registry.listSubKeys("HKEY_LOCAL_MACHINE/Software/MyApp");


Re: windows registry

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, July 15, 2004 11:59 PM

About | Sitemap | Contact