此代碼對於我嘗試從AIR應用程序啓動Java的AIR 2.0本機進程有很多麻煩,然後Java.exe在Windows任務管理器中自行終止,我發現引起了new MidiTest()
。新的實例有更好的解決方案嗎?用其他解決方案替換New?
public static void main(String[] arg) {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
while (!(speed.equals(speed_stop))) {
try {
speed = in.readLine();
if(!(Global.newPlayer.equals("1"))){new MidiTest();}
} catch (IOException e) {
System.err.println("Exception while reading the input. " + e);
}
}
}
private MidiPlayer player;
public MidiTest() {
System.out.println("Start player");
// /*
}