Попробуйте отловить ошибку:
Code:
private void playFromResource() {
try {
InputStream is = getClass().getResourceAsStream("/ding.wav");
Player player = Manager.createPlayer(is,"audio/x-wav");
player.realize();
VolumeControl vc = (VolumeControl)player.getControl("VolumeControl");
if(vc!=null) {
vc.setLevel(100);
}
player.prefetch();
player.start();
} catch (Exception e) {
showException(e);
return;
}
mDisplay.setCurrent(mMainScreen);
}
private void showException(Exception e) {
Alert a = new Alert("Exception", e.toString(), null, null);
a.setTimeout(Alert.FOREVER);
mDisplay.setCurrent(a, mMainScreen);
}
См. также "How to play music files using JSR 135"