• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MIDP 1.0 to MIDP 2.0 porting

 
Greg Schwartz
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will a MIDP 1.0 jar/jad install and run properly on a MIDP 2.0 device?
 
David Price
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In principle, yes. In practice, there are always minor differences between devices, so you'll need to test on the real device. Remember, a MIDP 1.0 jad/jar will not always install and run properly on a MIDP 1.0 device - different devices have slightly different implementations. Sadly, even MIDP 2.0 does not completely achieve 'Write Once, Run Anywhere'.
 
Greg Schwartz
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David...Thanks for that information.
We are finding that our MIDP 1.0 application will not install on Motorola's V300,V400,V600 MIDP 2.0 devices. Do you know if the MIDLET-VERSION property in the manifest needs to be changed to 2.0 from 1.0 or if this is not critical?
If anyone has any information on installing to these devices, please let me know.
Thanks!
Greg
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, three thanks from Greg.
Thanks for the information, I was about to get the V400 from Cingular, and I wanted to test out my MIDP 1.0 application that I wrote. I want to sell the application, so I need to keep it at 1.0 for now, until all phones have MIDP 2.0
Thanks
Mark
 
Greg Schwartz
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for all of those submissions... That was definately a mistake as I was being told my reply had failed to post.
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can always delete your own posts.
Anyway, I suspect the JAD version is not the issue here. MIDP 2 does have a more strict security constrain. Maybe you used some network/sms API without granting permissions or you signed the JAR improperly? What are the error messages?
 
Sathya Srinivasan
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the spec., all applications that are written in MIDP 1.0 will be treated as untrusted in MIDP 2.0. This effectively means that user will be explicitly asked for permission for any net access.
Other than that the spec at least says that MIDP 1.0 is 'fully' compatible with MIDP 2.0. So I wouldn't think that the JAR/JAD declaration is the problem here.
However, as others said, there might be slight variations in the phone implementation itself.
Did it give any errors for you?
 
Greg Schwartz
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error message we are getting is "Failure: File Invalid" when installing on V300,V400 and V600 devices. We are not digitally signing the application at this time. The same application works great on MIDP 1.0 devices and does not make use of any network connections.
Any suggestions would be greatly appreciated!
Thanks again,
Greg
 
David Price
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just installed an old MIDP 1.0 MIDlet (Forum Nokia's 'Boids') in my Nokia 6600, a MIDP 2.0 phone, and it worked fine. No need to update the MIDP version in the JAD file.
Maybe Motorola's developer site has a discussion group where you could ask this question? There might be more people there with experience of those phones.
 
Sathya Srinivasan
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although I did not try in Nokia phones, I have received similar messages in my Sony T610 phone.

Here are two potential solutions.
1. Make sure your manifest.mf file contains the proper attributes (MIDlet-Vendor, MIDlet-Name, etc.). Very important.
2. Try just uploading the .jar file (no .jad) to the phone. I found that this sometimes solves the problem.
 
Fred Grott
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Greg Schwartz:
Will a MIDP 1.0 jar/jad install and run properly on a MIDP 2.0 device?

the aspect of wil midp2 run midp1 apps uncertified has not been clairifed by the spec lead..noted as bug at sun..
at bare minimum I woudl assume that you need to sign the midlet with a cert to run under midp2
 
Greg Schwartz
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fred,
Could you explain what you mean by "sign the MIDlet with a cert for MIDP 2.0". Would this be done using the sign functionality in the WTK 2.1 ?
If you could explain how this is done or provide a link discussing the process for signing, as you are describing, that would be great.
Thanks again,
Greg
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic