A friend of mine recently asked me how one can test a J2ME application on a real phone as opposed to the emulator. This is a very simple task and so I thought I should do it right away. Here we go:
Your project folder probably looks like the following screenshot;
The main folder should be having the following folders;
and an xml file named “build.xml“.
In J2ME the jar file to be installed on the phone is automatically generated by the IDE and so you don’t need to run any command. Browse to the folder named dist and you should get the following;
- A folder labelled “lib“.
- A jad file labelled with the name of your app e.g. login.jad
- A jar file labelled with the name of your app e.g. login.jar
What your now need to do is copy the jad and the jar file to your phone using for example a data cable, bluetooth or any other means. Once you have done that browse to the location of the jar file and execute it. You dont need to touch the .jad file,it is the application descriptor containing all the details about your application. That is all! If you face any problems just post a comment and I will get back to you.