aspose file tools*
The moose likes Java Micro Edition and the fly likes How to test J2ME apps in real mobiles? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "How to test J2ME apps in real mobiles?" Watch "How to test J2ME apps in real mobiles?" New topic
Author

How to test J2ME apps in real mobiles?

Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Hey all,

I created a small J2ME app which displays an alert when the user clicks the "OK" button. I use netbeans, I built it via that IDE too. However, when I copy that file into my mobile, it is giving "Java Error. Invald Information" error. My mobile is "Samsung GT-C3312. THe files I copied are under the "dist" folder which netbeans created for the distribution. I am attaching the code too. I tested this file fine in netbeans. Please tell me why this is not working. And please not this is my second J2ME app, which means I am a newbie.Thanks.




Code:


Are you better than me? Then please show me my mistakes..
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

Did you try running your application outside netbeans on your computer?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

Yohan Weerasinghe wrote:THe files I copied are under the "dist" folder which netbeans created for the distribution.

Please TellTheDetails. The only files you should need to copy to the phone are the .jar and .jad. Then you 'execute' the jad, which unpacks the jar into some hidden folder somewhere on the phone, and you never see it again except in its new avatar as an icon shown by the AMS (Application Management System).

Did you set the correct CLDC/MIDP versions before building the project?


luck, db
There are no new questions, but there may be new answers.
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

thqnks all for the replies and pardon me for the delay. we had heavy raining so i couldnt access internet properly. i will attach my whole dist folder tomorrow.

and for the question about whether i have selected everuthing correctly, the answe is i have kept all the deafaukt settings netbeans had when creating a mobile project. please help
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

The default settings may not correspond to your phone's capabilities. Check CLDC and MIDP versions. Also, deselect the check boxes for any unused optional API.

i will attach my whole dist folder tomorrow.

Probably won't be of much use.

If you can't locate the Java ME specs for your handset, post the handset make/model. Also the contents of the .jad, and the .jar manifest.
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

wow..Thanks a lot for all of your replies, I really appreciate it. I followed your advices and checked for the MIDP version of my phone. It was 2.0 and my app was 2.1! Then I created a new project with 2.0 specifications and it worked! Thanks a lot!!


Anyway, another problem. In a previous comment, I am advised to install .jad file to my phone. In this case, I have to put both the .jad and .jar files to my phone. I have downloaded several apps to my phone and all of they have 1 file (I guess .jar), not 2. How come this happen? Please help!
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

Search the net for 'OTA provisioning'
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Darryl Burke wrote:Search the net for 'OTA provisioning'


Thanks for the reply Darryl. I will have a look
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to test J2ME apps in real mobiles?