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'.
Joined: May 11, 2003
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
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
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?
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?
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
Joined: Jan 22, 2003
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.
Joined: Jan 29, 2002
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.
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
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