以下のコードを使用しています ( http://www.java-tips.org/java-me-tips/midp/playing-video-on-j2me-devices.htmlからの参照)。「realize()」で失敗しjavax.microedition.media.MediaException、「ネイティブ プレーヤーを作成できません」というメッセージが表示されます。ここで何が問題なのですか?
Eclipse と Netbeans の両方を使用してこれを試しました。「インターネット」権限がないか、不適切なエンコーディングを使用しているのでしょうか。ビデオは外部の「mpg」テスト リソースであり、デスクトップ ブラウザからダウンロードすると正常に動作します。
public void run()
{
    String url = "http://www.fileformat.info/format/mpeg/sample/05e7e78068f44f0ea748855ef33c9f4a/MELT.MPG";
    //Append the GUI to a form
    Form form = new Form("Video on java mobile!");
    Display display = Display.getDisplay(this);
    display.setCurrent(form);
    try
    {
        HttpConnection conn = (HttpConnection)Connector.open(url, 
            Connector.READ_WRITE);
        InputStream is = conn.openInputStream();
        Player p = Manager.createPlayer(is,"video/mpeg");
        //I tried the below, but that didn't work either
        //Player p = Manager.createPlayer(url);
        p.realize();
        //Get the video controller
        VideoControl video = (VideoControl) p.getControl("VideoControl");
        if(video != null) 
        {
            //Get a GUI to display the video
            Item videoItem = (Item)video.initDisplayMode(
            VideoControl.USE_GUI_PRIMITIVE, null);
            form.append(videoItem);
        }
        //Start the video          
        p.prefetch();
        p.start();
    }
    catch(Exception e)
    {
        form.append(url + " Error:" + e.getMessage());
    }
}
Java、Eclipse、Netbeans を使い始めたばかりです。同様のサンプルがいたるところにあるため、非常に基本的なものが欠けていると思います。誰か助けてくれませんか?