Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how add a key in windows registry

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hi,

I wonna creat an entry (a key or a value)in the registry of windows XP with java,
is there any class that do that, or is there a way do it without using
regedit (cause regedit give you a prompt) so I can use Runtime like that

Runtime.getRuntime().exec("cmd.exe /c start a_command_in_dos_to_add_a_key_in_the_registry");
 
You can access and set system properties (environment variables) through Java code. I suppose if there was a dos command to set a key in Windows registry you could do it, but that seems like to me that defeats the system independence provided by Java. Another way is to write a section of native code and include it in your Java program.

JavaDude32
 
hi JavaDude32,

I wan't to make this java application run at startup, so I can't do that by seting the java properties.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top