*
The moose likes Java Micro Edition and the fly likes Installing a MIDlet on an actual device Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Installing a MIDlet on an actual device" Watch "Installing a MIDlet on an actual device" New topic
Author

Installing a MIDlet on an actual device

Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
I have a Sprint Sanyo picture phone (I don't know the model number off the top of my head) and would like to install a midlet on it. I'm know it is Java enabled because the games I download from Sprint's partners have the Java logo. Of course, this doesn't mean it uses J2ME necessarily, but I am pretty sure that it does.
I uploaded a midlet suite, both the jad and jar files, to my website and created a page at http://www.cpp4you.com/java/midlets that has links to the jad files. However, when I try to download one of the midlets, I get "HTTP Error 406: Content not acceptable". I suspect this might mean that my web server doesn't have the appropriate MIME types. I have tried to content my provider to get more details, but haven't heard back from them, yet.
Is there anything I can do to fix this error? Is my guess correct that the MIME types need to be set up for jad and jar files? Are there any other reasons that this error would occur?
I would sure appreciate any help you guys can provide.
Thanks,
Layne


Java API Documentation
The Java Tutorial
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
If your host uses the apache server, you can create a .htaccess file in your root directory and add those two lines:


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
I tried that and I still get the same error message. I tried refreshing the URL to make flush out the version that may have been cached. I'm pretty sure that my server runs Apache since the OS is some flavor of Unix. When I run "ps -ax", there are several instances of httpd running.
Any more suggestions to try?
Layne
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
The server could be configured to disable user ".htaccess" files for security reasons. If that is the case, you have to ask your host to change the configure for you.
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
I recieved an email back from tech support which says
"We are sorry to let you know that we do not have WAP support on our
servers and hence you might have encountered the issue."
Do they have to support WAP specifically in order for me to download midlets from my website on their servers? From what I understand of OTA provisioning, the server needs to reply to an HTTP request with the correct MIME types. Is there any more to it than that?
Layne
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Well, part of my answer is from ignorance.
When I made my "site" for downloading my app to the phone. I created a WML page to link to the JAD file. I am not sure is the server must be WAP enabled for WML pages.
WML is really really easy to learn, just go to www.w3schools.com
They have a quick and easy tutorial there.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Cool! I'll check that out as I when I have more time.
So is it possible to serve midlets with an HTML page rather than through a WML page?
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
I am pretty sure that the OTA server does not *have to* be WAP enabled in any way. Just plain HTTP and above two MIME types would be enough. You should have just asked them to add those two MIME types. If you tell them you are using WAP/J2ME, they will come back with some nonsense answers since they do not really understand it and do not want the extra trouble.
David Price
Ranch Hand

Joined: Jan 22, 2003
Posts: 93
I checked the MIDlet files on your page using Rex Swain's HTTP Viewer, a tool I strongly recommend. Your Bounce.jad is empty, so that won't work. Your Welcome.jad specifies the wrong length for the JAR file (it says 1915, but the file is actually 2037 bytes long). So that won't work either. On the other hand, your server is correctly returning the MIME types.
Sadly, phones differ on how you do OTA installation. I think all Nokia phones are happy for you to specify a path to a JAD file directly (rather than needing the JAD files to be selected from a WML page). Earlier Nokia MIDP phones (e.g. 7210) mostly had just WAP/WML browsers, but more recent phones (e.g. 6600) can also show HTML pages and don't need your operator to support WAP.
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Thanks for the help. I'll make the necessary modifications and upload the Bounce.jad file to see what that does.
Layne
p.s. As I mentioned earlier, my phone is a Sanyo, not Nokia (unless that Sanyo is owned by Nokia). I can view the HTML page just fine, so the phone obviously supports HTML. The problems seem to be with visiting the links to download the midlets.
[ March 10, 2004: Message edited by: Layne Lund ]
[ March 10, 2004: Message edited by: Layne Lund ]
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Okay, I changed the file size and it didn't work. I'm about ready to give up on downloading midlets from my current server. I currently use Addr.com as my content provider. Does anyone know of somewhere that will allow me to serve both HTML and WML pages? I'm even willing to pay a small monthly fee for the service.
Layne
[ March 10, 2004: Message edited by: Layne Lund ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

What about David's other suggestion? Did you use the link that he supplied to look again at your html and files?
Mark
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Yup, I used it to check out the jad and jar files and saw the correct MIME times are returned. The HTML page looks right, too, although I had to explicitly list the file name (index.html) rather than just the directory.
I haven't had a chance to upload the Bounce.jad file, yet. I find it odd that it isn't there. I must have interrupted the ftp session while it was uploading before.
Anyway, I'm stuck. I don't know what else to try. Does anyone have any more suggestions?
Layne
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

well, there is a website here.
At pcspix you can simply upload your jad and jar file and then test it out. This will help out a bit and it is free.
Mark
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Thanks! I'll check it out.
Layne
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Well, I had to take a break from this since I was getting frustrated. I tried out PCSpix, but after I download my midlet to my phone, I get the following error message:
"Data Error 905
Attribute Mismatch"
I dont' know what this means exactly. I've double-checked the information in my jad file, especially the jar file size, but I haven't found the problem there. Are there any other suggestions about how to fix the problem?
Thanks in advance,
Layne
a sanjuan
Ranch Hand

Joined: Jun 12, 2002
Posts: 164
i believe our webserver can distribute midlets...if you'd like, email me the jad and jar and i'll upload it and test it via OTA to my nokia and motorola. actually, if it's not a secret, include the source so i can make sure the jad is created correctly. my email is kalim1998 (at) yahoo.com
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
One of the midlets I'm playing with is an example from Core J2ME, so I don't see a problem with sending you the source. The other is my own that I plan on releasing as Open Source anyway. I just need to include the copyright and licensing information in the java file before I send it to you. I'll get it to you tomorrow at the latest.
Thanks,
Layne
justin victor
Greenhorn

Joined: Apr 22, 2004
Posts: 1
If anyone finds out exactly what's wrong please say!
I'm having the same problem with a Sagem myX-6 and Sharp GX1 (both openwave browsers), but the same .jad file works fine with the Nokias I tested it against.
I get a 'HTTP Error: Not Aceptable' when I try to access the .jad file
Arun D Paika
Greenhorn

Joined: Apr 21, 2004
Posts: 15
hi,
Does anybody know, how to deploy a midlet to a NOKIA 6600 using
bluetooth?? I'm using NOKIA Developer's Suite 2.0.
Plz help me
David Price
Ranch Hand

Joined: Jan 22, 2003
Posts: 93
With the Nokia 6600 it's really easy to deploy MIDlets via Bluetooth: just send the JAD and JAR files to the phone, open either one (they'll appear as incoming messages) and the installer will install the MIDlet.
In my Windows 2000 laptop, I select the JAD & JAR files in Windows Explorer and use the right-mouse-button menu "Send To -> Bluetooth -> David's Nokia 6600".
Arun D Paika
Greenhorn

Joined: Apr 21, 2004
Posts: 15
Thank you very much David.....
I have i more doubt. while running my MIDlet, Is it possible to go to some other native applications like media player , voice recorder etc., without closing my application??
Arun D Paika
David Price
Ranch Hand

Joined: Jan 22, 2003
Posts: 93
It depends on the phone. Nokia 6600 uses the multi-tasking Symbian operating system, and hence you can run several applications at the same time, e.g. a MIDlet and the voice recorder, or two or more MIDlets. Obviously this is ultimately limited by the amount of memory available.
Arun D Paika
Greenhorn

Joined: Apr 21, 2004
Posts: 15
Thank you
 
GeeCON Prague 2014
 
subject: Installing a MIDlet on an actual device