![](/img/trans.png)
[英]I recovered a deleted .class file, however when i am trying to run it using java it gives classFormatException?
[英]I am trying to get this file to run after scheduled time, however it only ran once
我试图让这个音频文件在给定时间后运行。 我知道我需要重置所有东西,我只是不知道 go 如何做到这一点。
我如何让它在设定的时间表上运行不止一次?
Timer t = new java.util.Timer();
TimerTask tt = new TimerTask() {
@Override
public void run() {
try {
audioClip.open(audioStream);
} catch (LineUnavailableException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
audioClip.start();
JOptionPane.showMessageDialog(null, "Click OK to Stop Music");
audioClip.stop();
t.cancel();
}
};
t.scheduleAtFixedRate(tt, 500, 1000);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.