First MIDlet help
Hello,
I'm brand new to J2ME (and still a beginning programmer), and I was hoping to get some assistance or some resources for my current issue.
I have a very small, very simple MIDlet that I am trying to get to run on my Samsung SGH-A707 (also known as the Samsung Sync).
The MIDlet runs in the emulator provided in the Wireless Toolkit 2.5.1. I've used the toolkit to package the MIDlet and created the .jar and .jad files.
The issue is when I move it to the phone. Using Bluetooth, I''ve pushed the .jad, the .jar, .mf, all to the phone. I even tried the raw .class file just as an option. Whenever I try to run any of these, the phone gives me "Unsupported file type".
I've read that Cingular has locked the phone's capabilities and you can't simply move java files to the phone, but that you have to use OTA provisioning. I found www.euploader.com, a site that allows you to upload your files for free, and then download them to your phone over WAP. I can surf with my phone to the site to download the file, but when I try to actually download the file, the phone tells me "Incorrect description", and I am unable to download it.
I've been researching this problem for a few days now and I can't seem to find any references to either of these error messages.
Am I still going about this the wrong way, trying to get my MIDlet on the phone? Did I miss a step? Does anyone have other suggestions to get the program on the phone?
I appreciate any answers and resources anyone can present.
[1556 byte] By [
Mala] at [2007-11-27 9:20:02]

# 1
Hallo Mal.
You said:
"I can surf with my phone to the site to download the file, but when I try to actually download the file, the phone tells me "Incorrect description", and I am unable to download it."
Did you try to access to the file on "uploader" also from Emulator using OTA?
By the way, you should download actually .jad (not .jar) file using OTA - "Jad" file is the actually descriptor.
So, it's also reasonable to check properties in descriptor if all above are ok.
jDeea at 2007-7-12 22:12:49 >

# 2
I am actually trying to download the .jad file; I apologize I wasn't clear on that.
Thanks for the tips, I'll try accessing the uploader with the emulator and I'll learn more about the .jad file properties. Is there anything in particular in the descriptor for which I should be looking?
Mala at 2007-7-12 22:12:49 >

# 3
Almost nothing concrete to check in descriptor, only its format.
It should contain property pairs:
name1: value1
name2: value2
etc.
Only one idea also, check the following items:
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.1
Check, if this ClDC and MIDP versions are supported by your target device.
If they are not - set acceptable for device versions of libraries in build configurations of your project in WTK.
If all is OK, Emulator does successfully upload and run the package, versions of libraries are OK too, then it's only possible to report bug to producer of your phone device.
Regards.
jDeea at 2007-7-12 22:12:49 >

# 4
take out the MicroEdition-* stuff, serves no purpose there, plus, there is no "midp 2.1" thats invalid. and those are optional declarations anywayscan we see the JAD that you're trying to download?
# 5
Hi
I'm very new to Java (< 2 weels) but I just wonder, could this be the problem?
Excerpted from http://developers.sun.com/mobility/midp/articles/deploy/
Change your JAD file's MIDlet-Jar-URL property to specify the URL of your JAR file. For example, in the copy of games.jad you uploaded to the server, change...
MIDlet-Jar-URL: games.jar
...to...
MIDlet-Jar-URL: http://YourWebServerAddress:port/pathTo/games.jar
Regards, Darryl
# 6
This is my .jad file
MIDlet-1: OddEven, OddEven.png, OddEven
MIDlet-Jar-Size: 1762
MIDlet-Jar-URL: http://euploader.com/wap/upload/OddEven.jar
MIDlet-Name: OddEven
MIDlet-Vendor: Unknown
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.1
Oddly enough, the packager within the Wireless Toolkit gave those MicroEdition options, and even the MIDP-2.1. At this point I don't why that is. I chose defaults when I set up the project in the toolkit.
I'm going to remove those options and try again.
Mala at 2007-7-12 22:12:49 >

# 7
I just found a discrepancy in my file names.My .jad file, you'll notice, calls the file OddEven.jar, which OddEven is the name of my class. However, it seems the server I am uploading it to changes the name to oddeven.jar when I upload it. Could this be having an impact?
Mala at 2007-7-12 22:12:49 >

# 8
Well I tried a new MIDlet with the name oddeven, to match the name given by the uploading site.
My new .jad
MIDlet-1: oddeven, oddeven.png, oddeven
MIDlet-Jar-Size: 1762
MIDlet-Jar-URL: http://euploader.com/wap/upload/oddeven.jar
MIDlet-Name: oddeven
MIDlet-Vendor: Unknown
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.1
I left the MicroEdition options in, again because the toolkit puts them in there.I'll try removing those options next time.
Again, I received the same error. "Incorrect description"
Mala at 2007-7-12 22:12:49 >

# 9
And I've been trying to verify the specifications of my phone, but I haven't been able to locate anything that specifies which CLDC and MIDP the phone supports. The best I've found so far is simply "J2ME".Does anyone have a resource I might be able to verify that information?
Mala at 2007-7-12 22:12:49 >

# 10
stop everything and read this article... http://today.java.net/pub/a/today/2005/02/09/j2me1.htmltry to create a simple HelloWorld MIDlet and after you will go further