Hi, I have just create my first Midlet with J2Me Wireless toolkit and I would like to deploy it on my Web Server to download from wireless device (Nec e606 or nokia7250). First I tried with the OTA emulator of J2Me Wireless toolkit and it was working. Now I put my file .jar and .jad on the Apache Web server and I create the html page with the Link to the Jad file (Midlet JAR Url is name.jar the files have the same path) but my device cannot download the Application. I have configured apache mime Type as required (.jar and .jad) and from another Web site I can download Application OTA. what can I try??
I had the same problem with downloading my MIDlet OTA. Instead of creating a html page containing a link to the jad file, and entering the address of the html page into your wap browser, try entering just the url for the jad file into the wap browser on the mobile device. Mine was something like "184.108.40.206/examples/jsp/name.jad", as I just put the MIDlet into the jsp examples directory in Tomcat. I know this is not an ideal solution, but it worked for me and I was able to download my MIDlet suite OTA. Hope this helps, Sean.
Joined: Aug 19, 2003
thank you for your reply Sean, Now it works, but I have modifify this two things: 1)- in the html file I have specified the mime type <br/> <object declare="declare" id="aaaa" data="http://xxxxxx/xxxx/xx.jad" type="text/vnd.sun.j2me.app-descriptor"></object> <a jad="#aaaaa" href="http://xxxxxx/xxxx/xx.jad">yyyy</a><BR> also if I insered the mime types descriptors for jar and jad in etc/httpd/conf/httpd.conf 2) - I have modify settings in j2me toolkit, Midlets->icon was fill with a file not present on the web server, so I have deleted it first of make the package. I hope you will reply also my next post. Thank you Moreno
Joined: Jul 20, 2003
Moreno, I am also new to J2ME and have had a fair bit of trouble with downloading my MIDlet OTA. I was not able to figure out why I couldn't create a link to the jad file on a html page and use the WAP browser to download it by selecting the link on the html page. My phone kept giving a "Format not supported" message when I tried to view the html page. I'm sure this is something fairly basic to overcome, but the deadline for my project is soon and it didn't matter how I got the MIDlet onto the phone, as long as I was able to demonstrate OTA provisioning. I am not sure about this at all but I think that you need a wap gateway in order to translate the html page so that it can be viewed by the WAP browser on your phone. Hopefully someone on this board will let me know if this is wrong. This is the only reason I can see for the phone not being able to view the html page I made, but can view html pages which have been translated by a search engine like Google. Sorry I couldn't be more help with your problem, hope you get it sorted soon. Good luck, Sean.
If you have a Nokia phone that supports WAP 1.2.1 (e.g. Nokia 7250), its WAP browser can't understand HTML, but instead understand something similar called WML. While your operator's WAP gateway may convert an HTML page to WML, it's perhaps more reliable to just write the WML file yourself. Here's a WML file I've been using successfully with e.g. Nokia 7210:
Put the JAD & JAR files (in my case, boids.jad & boids.jar) in the same directory as this WML file on your web server, and make sure that your web server's mime.types has entries like this:
Why aren't you writing a WML page instead of HTML? Sorry if this is a stupid question but I just can't see why would you want to rely on a WAP gateway being able to convert HTML pages to WML when you could just as well do it yourself...
David, thanks for the explanation - I am new to J2ME and have no experience with WML so I didn't realise it was that easy to write a wml page. Thanks for the code as well, it works fine on the wap browser on my phone and I can now link to a few MIDlets from the same page. Lasse, as I said I am new to J2ME and was following a JBuilder tutorial on OTA provisioning. It uses a html page to link to the jad files, but made no mention of anything else that would be needed for the phone to access the simple page, like a wap gateway. Chalk it up as another rookie mistake Cheers again, Sean.
for some phones, you mya have to specify the full url of your jar file in JAD. relative URL doens't work ben
<a href="http://www.benhui.net" target="_blank" rel="nofollow">www.benhui.net</a> - mobile dev resources - j2me - bluetooth - midp 2.0 - review - links<p>Get Share Bill Buddy - Bill splitting (FAST!), Share trip expenses, Who Owe Me 3-in-1<br />Free trial on <a href="http://www.sklogicsoftware.com" target="_blank" rel="nofollow">www.sklogicsoftware.com</a><p>Get Travel Buddy - Itinerary, Tracker, Global Clock, Concurrency Convertor 4-in-1<br />Free version available at <a href="http://www.sklogicsoftware.com" target="_blank" rel="nofollow">www.sklogicsoftware.com</a>
hey, Im using a Sony Ericsson T610 to try and downlod my midlet, i've put it on a web server and added the mime types for jad, wap and wml. My phone can open the wml fine, and tries downloading the jad from the link in the WML, but then says its not supported and that it cant download If i put the URL for the .jar into the phone, then it finds it, realises it needs to be downloaded and gives me a menu where i can see info | memory status | download. But again when i select download it says its not supported and that it cant download it. Do i need to have a MIME type for the jar? Any help would be amazing Thanks Matt
Joined: Jan 22, 2003
I've not used that phone, but yes, you generally need a MIME type for the JAR ("application/java-archive") - see my reply above. If you're unsure whether your server is returning the right Content-Type headers, check them with Rex Swain's HTTP Viewer.
Secondly, the jar file signed as above does not install on the device(Nokia 6600) Is there some setting that I'm missing ?? The AMS in the emulator runs by looking at the classpath.What should the class path be set to? Thnaks
For example, about the use of self-signed certificates only in an emulator (for simple testing only) but not for signing MIDlets for use in an actual MIDP2 device. This is because a MIDlet that is signed with a self-signed certificate cannot be authenticated by a real device.
Hope this helps.
Joined: Jun 24, 2004
Thank you james , About nokia: I have gone through the article that you mentioned but it seems that the Nokia6600 that I'm using does not have the firmware version to support any certificates - either fom thawte or verisign.And there really is no way to test the signed jad file in emulator.so if i want to test my application behaviour after having signed it I have to buy a certificate.:-(....that's not very good. About WTK21: I've tried everything ever printed/online to test midlet behaviour in emulator after signing.........but no success, I still get an error when I deploy via "Run via OTA"........