registry editing with java

how would you change a registry key value data using java? I simply want to change the desktop background under the current user by editing that reg key. And i also need to know if there is a way to see where the users windows directory is, for example, instead of saying C:\windows just something like %windir% (like in dos), just incase the users windows directory is under a different drive letter. Using all this i want to edit the HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper key to make the desktop picture change to,

ex. %windir%\Clouds.bmp . (C:\windows\Clouds.bmp). Any help would be greatly appreciated, even if there is a way to do this in any other programming language, it just needs to be done, thanks a lot.

kevin

[760 byte] By [kevinpriebe] at [2007-9-26 1:26:32]
# 1
To do this in java you need to use JNI or Runtime.exec(). I believe regedit has a command line mode that allows you to extract values.There is a freeware module that does registry stuff via java too. Try searching via google.
jschell at 2007-6-29 1:09:35 > top of Java-index,Core,Core APIs...