import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import javax.microedition.media.*; import javax.microedition.io.*; public class main extends MIDlet { public Player pl; public void startApp() { Form f=new Form("media"); Display.getDisplay(this).setCurrent(f); try{ pl=Manager.createPlayer("m.mid"); f.append("ok"); pl.realize(); pl.setLoopCount(-1); f.append("ok"); pl.prefetch(); pl.start(); f.append("ok"); } catch(Exception me){ f.append("media"); } } public void pauseApp() { } public void destroyApp(boolean unconditional) { } }