我無法讓它進入睡眠狀態,我希望它在繼續之前暫停一秒。在我的循環中添加睡眠
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));
}
當我嘗試添加Thread.sleep(1000);它給了我一個錯誤,無法訪問的代碼。
你在哪裏添加它? – 2012-07-09 17:53:34
你想在哪裏停止這 – 2012-07-09 17:53:36
你在哪裏添加Thread.sleep()調用? – 2012-07-09 17:53:46