Desktop wallpaper
1 posts in topic
Flat View  Flat View

Posted By:   Sai_R
Posted On:   Tuesday, January 8, 2002 10:49 PM

Is it possible to change the desktop wallpaper using Java ?

Re: Desktop wallpaper

Posted By:   Jan_Bartovsky  
Posted On:   Wednesday, January 9, 2002 01:16 AM

The path to the wallpaper in windows is stored in the registry. It means that you have to change this entry either with the assistance of microsoft classes or with JNI by loading Advapi32.dll.

try {
com.ms.lang.RegKey key = new com.ms.lang.RegKey(RegKey.USER_ROOT,"Control Panel\Desktop",RegKey.KEYOPEN_WRITE);
} catch (Exception e) { e.printStackTrace(); }

This works with microsoft jvm. Compiling, you will need to work with /x- and /nomessage options. You should see what you've done next time you restart the system.

About | Sitemap | Contact