×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    21

    Pb with J2ME Polish

    HI all,
    I use a J2ME Polish and when i use a video i have an classCastException, knowing that when i dont use a J2ME Polish it works.
    Code:
    Player p;
    VideoControl vc;
    try {
    p = Manager.createPlayer("file:///C:/predefgallery/predefvideos/a.3gp");
    p.realize();
    // Grab the video control and set it to the current display.
    vc = (VideoControl)p.getControl("VideoControl");
    if (vc != null) {
    Form form1 = new Form("video");
    form1.append((Item)vc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE,null));
    display.setCurrent(form1);
    }
    p.start();
    } catch (IOException e) {
    e.printStackTrace();
    //#debug info
    System.out.println(e.toString());
    }
    I get a java.lang.ClassCastException at line
    form1.append((Item)vc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null));

    Any idea?
    Last edited by belzi; 2008-09-15 at 11:38.
    Regards
    Ziad

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Pb with J2ME Polish

    Hi belzi,

    since J2MEPolish Forms are actually based on Canvas, using VideoControl.USE_GUI_PRIMITIVE is probably wrong. You could try doing some tests with USE_DIRECT_VIDEO (and maybe avoiding to append the Video Item to your Form) and see what happens..

    Pit

  3. #3
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    89

    Re: Pb with J2ME Polish

    Hi Belzi

    All J2mePolish Forms are infact based on Canvas.
    Ue direct video instead. If you want to retain the look and feel of your application for viewfinder then use the following.

    Canvas canvas = StyleSheet.currentScreen;
    canvas = MasterCanvas.instance;
    videoControl.initDisplayMode( VideoControl.USE_DIRECT_VIDEO, canvas );

    Use a J2ME Polish Form as you were and use the above code to intergrate the viewfinder.

  4. #4
    Registered User
    Join Date
    Jul 2008
    Location
    Banglore INDIA
    Posts
    34

    Unhappy Re: Pb with J2ME Polish

    Hi,

    I am using j2mepolish-2[1].0.4.jar and netbeans 6.0 , after i install polish and start netbeans i get a message as..

    Warning - could not install some modules:
    enough-polish-netbeans - The module Java Platform was requested in version >= 1.10 but only 1.9.1 was found.



    does any one know what i should do to solve this..?

  5. #5
    Registered User
    Join Date
    Dec 2008
    Posts
    1

    Re: Pb with J2ME Polish

    Hi Everyone,

    I have the same problem I too get the same warning message
    "The module Java Platform was requested in version >= 1.10 but only 1.9.1 was found."

    I have Netbeans 6.0. Can someone help me with this?

    regards,

    Hasarinda

Similar Threads

  1. Ayuda con j2me polish
    By robervelez in forum Foro en Español (Spanish Forum)
    Replies: 2
    Last Post: 2007-06-06, 20:44
  2. J2ME Polish Version 1.0
    By enough in forum Mobile Java General
    Replies: 0
    Last Post: 2004-07-27, 01:10
  3. J2ME Polish Version 1.0 RC6
    By enough in forum Mobile Java General
    Replies: 1
    Last Post: 2004-07-20, 11:25
  4. J2ME Polish Version 1.0 RC5
    By enough in forum Mobile Java General
    Replies: 1
    Last Post: 2004-07-08, 16:34
  5. J2ME Polish 1.0 RC1!
    By enough in forum Mobile Java General
    Replies: 1
    Last Post: 2004-06-15, 02:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •