Skip to main content

Error in J2ME application while from ANT using OTA

2 replies [Last post]
Joined: 2008-04-22

Hello all,

I have made a J2ME application, while running from ant the application works fine if there is no push registry included, and not run using OTA,. But when i put some PushRegistry Machanism in it it does not behave normal like on closing it shuts down and never comes up again, but when i run it from Wireless tool kit it works fine...

Can u suggest what is the problem when I try to run the application using ant over OTA (Over the Air). here is my code for ant and the code written in application for push Registry:

---------------------The Ant Code for running over OTA------------------------------

--------------------------//End Ant Code--------------------------------------------------

--------------------------JAVA Code from Midlet---------------------------------------

public void scheduleMidlet(long et) throws ClassNotFoundException, ConnectionNotFoundException, SecurityException, Exception{
Date alarm = new Date();
String midletClassName = this.getMidlet().getClass().getName();
System.out.println("Midletclass name: "+midletClassName);
long t = PushRegistry.registerAlarm(midletClassName, alarm.getTime() + et);
System.out.println("Pushed into Registry.... After");
System.out.println("t == "+ t);

-------------------------// End Midlet code------------------------------------------------

-------------------------// JAD file Contains----------------------------------------------

MIDlet-Jar-URL: Zozoc.jar
MIDlet-Jar-Size: 120316
MIDlet-Name: Zozoc
MIDlet-Vendor: Trilogy
MIDlet-Version: 1.4.6
MIDlet-1: Zozoc, /icon.png, com.zozoc.Zozoc
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.0
MIDlet-Icon: /icon.png

------------------------------------------//JAD File Settings-------------------------------------------

and this what is done when i close midlet and this shouldn't happen
[nb-run] Pushed into Registry.... Before
[nb-run] Midletclass name: com.zozoc.Zozoc
[nb-run] Time that is pushed in.. 1208867773171
[nb-run] t == 0
[nb-run] Pushed into Registry.... After
[nb-run] Execution completed.

Please tell where am i going Wrong

Please Reply as soon as possible

Wasif Tanveer

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-04-22

The thread is answered in its other view it was sumbitted Twice...

Joined: 2008-04-22