Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
srk2012
Posts: 668
Registered: ‎12-04-2012
My Carrier: Airtel

Error:Description Resource Path Location Type Syntax error on token ";", { expected after this token MyApp.java /Streamit/src/mypackage line 37 Java Problem

I am following 

 

 

http://developer.blackberry.com/bbos/java/documentation/working_with_video_1984791_11.html     Error:smileyvery-happy:escription Resource Path Location Type Syntax error on token ";", { expected after this token MyApp.java /Streamit/src/mypackage line 37 Java Problem

Iam trying to stream a rtsp stream on  or with a Java application.

 

 

Plelse  help me

 

 

package mypackage;

import java.io.IOException;

import javax.microedition.media.Manager;
import javax.microedition.media.MediaException;
import javax.microedition.media.Player;

import net.rim.device.api.media.control.AdvancedVideoControl;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.UiApplication;

/**
 * This class extends the UiApplication class, providing a
 * graphical user interface.
 */
public class MyApp extends UiApplication
{
    /**
     * Entry point for application
     * @param args Command line arguments (not used)
     */
    public static void main(String[] args)
    {
        // Create a new instance of the application and make the currently
        // running thread the application's event dispatch thread.
        MyApp theApp = new MyApp();       
        theApp.enterEventDispatcher();
    }
    

    /**
     * Creates a new MyApp object
     */

    
    Field field;   // Error: Description    Resource    Path    Location    Type
Syntax error on token ";", { expected after this token    MyApp.java    /Streamit/src/mypackage    line 37    Java Problem




    try
    {
        Player p = Manager.createPlayer("rtsp://rtsp.youtube.com/youtube/videos/HtVbAazUekM/video.3gp");
        p.realize();

        AdvancedVideoControl vc;
        if ((vc = (AdvancedVideoControl) p.getControl(
             "net.rim.device.api.media.control.AdvancedVideoControl")) != null)
        {
            field = (Field)vc.initDisplayMode(AdvancedVideoControl.USE_GUI_ADVANCED,
                     "net.rim.device.api.ui.Field");
            vc.setVisible(true);
        }
        p.start();
    }
    
    
    catch (MediaException pe)
    {
        // Code that runs if a player cannot be created.
    }
    catch (IOException ioe)
    {
        // Code that runs if the video source is not accessible.
    }
    
    
}
   
}

Please use plain text.
Developer
srk2012
Posts: 668
Registered: ‎12-04-2012
My Carrier: Airtel

Re: Error:Description Resource Path Location Type Syntax error on token ";", { expected after this token MyApp.java /Streamit/src/mypackage line 37 Java Problem

somebody please try to reply to my query :Urgent
Please use plain text.