You Are Here:

Community: Developer Discussion Boards

#1 Old Pb with J2ME Polish - 2008-09-15, 11:53

Join Date: Sep 2008
Posts: 21
belzi
Offline
Registered User
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?


Regards
Ziad
Last edited by belzi : 2008-09-15 at 12:38.
Reply With Quote

#2 Old Re: Pb with J2ME Polish - 2008-09-15, 18:37

Join Date: Nov 2007
Posts: 2,029
Location: Rome, Italy
Send a message via MSN to jappit Send a message via Skype™ to jappit
jappit's Avatar
jappit
Offline
Forum Nokia Champion
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


www.jappit.com - mobile and web blog
Reply With Quote

#3 Old Re: Pb with J2ME Polish - 2008-09-16, 12:41

Join Date: Jul 2003
Posts: 88
morash
Offline
Regular Contributor
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.
Reply With Quote

#4 Old Unhappy Re: Pb with J2ME Polish - 2008-09-18, 14:34

Join Date: Jul 2008
Posts: 34
Location: Banglore INDIA
cutenik73's Avatar
cutenik73
Offline
Registered User
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..?
Reply With Quote

#5 Old Re: Pb with J2ME Polish - 2008-12-10, 11:35

Join Date: Dec 2008
Posts: 1
hasarinda
Offline
Registered User
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
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Ayuda con j2me polish robervelez Foro en Español (Spanish Forum) 2 2007-06-06 21:44
J2ME Polish Version 1.0 enough Mobile Java General 0 2004-07-27 02:10
J2ME Polish Version 1.0 RC6 enough Mobile Java General 1 2004-07-20 12:25
J2ME Polish Version 1.0 RC5 enough Mobile Java General 1 2004-07-08 17:34
J2ME Polish 1.0 RC1! enough Mobile Java General 1 2004-06-15 03:53

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ