I can’t get it to sleep, I want it to pause for a second before continuing.
public static void main(String[] args) {
//supply your own path instead of using this one
String path = "\\image.JPG";
for(;;)
SPI.INSTANCE.SystemParametersInfo(
new UINT_PTR(SPI.SPI_SETDESKWALLPAPER),
new UINT_PTR(0),
path,
new UINT_PTR(SPI.SPIF_UPDATEINIFILE | SPI.SPIF_SENDWININICHANGE));
}
When i try to add Thread.sleep(1000); it gives me an error, unreachable code.
Try this… adding the sleep method inside the for loop.