Yes, it can be done. I''ve played with this idea before and it could be applied to java as well. All you need to do it..
1) It must be running as an application! This can NOT be done from an applet.
2) You need a Image -> BMP converter
3) Basic understanding of regedit files.
Ok to make life easier if you settle on one filename for you wallpaper it will make it easier. Set it up the way you want and export ( in regedit )
Delete all unnecessary config lines from the file and save this as restoreWall.reg or something to that extent. Now whenever you want to restore your wallpaper or install a new one, just drop your .bmp over the old one and call "regedit -q restoreWall.reg".
Unfortunatly you will need to restart to make this work. You may be able to do something cleaner with the M$ java com interface but I''m not the one to ask.