• 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

How to test J2ME apps in real mobiles?

 
Ranch Hand
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try running your application outside netbeans on your computer?
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Search the net for 'OTA provisioning'
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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



Thanks for the reply Darryl. I will have a look
reply
    Bookmark Topic Watch Topic
  • New Topic