• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with OTA download Midlet

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 "123.123.123.123/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.
 
moreno pe
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sean McGaughey
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:

Then it should all work.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Sean McGaughey
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for some phones, you mya have to specify the full url of your jar file in JAD. relative URL doens't work
ben
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
David Price
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
this seemed like an appropriate thread to ask about my problems.

Firsly ,I'm trying to generate my own key-pair in WTK21 and sign a jar with it.When i test it in the emulator via "Run via OTA" it gives me an error on the toolkit display:-
java.lang.error static initializer java/lang/nullpointerexception
(I'm referring to this article http://developers.sun.com/techtopics/mobility/midp/articles/permissions/ )

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
 
wrangler
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For a Nokia 6600, it might help to have a look at the Forum Nokia tutorial on
signed MIDlets if you haven't done so already:
http://www.forum.nokia.com/main/1,6566,1_0_10,00.html

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.
 
greenhorns Inc.
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"........
 
reply
    Bookmark Topic Watch Topic
  • New Topic