Java Code for sending SMS

Hai all,

I am trying to develope a java code that sends SMS . I downloaded and installed the J2ME Wireless Toolkit API and am able to compile the following code. But upon running it shows unsatisfiedLinkError. Please tell me what I need to do to solve this problem?

import java.io.*;

import javax.microedition.io.*;

import javax.wireless.messaging.*;

import javax.microedition.lcdui.*;

import javax.microedition.midlet.MIDlet;

public class connectCode

{

public static void main(String args[])

{

//JSR 120: Wireless Messaging API

//To send SMS

try

{

String addr = "sms://+9344812730";

MessageConnection conn = (MessageConnection) Connector.open(addr);

TextMessage msg = (TextMessage)conn.newMessage(MessageConnection.TEXT_MESSAGE);

msg.setPayloadText("Hello World!");

conn.send(msg);

}

catch (Exception e)

{

System.out.println("Exception "+e);

}

}

}

OUTPUT:

Exception in thread "main" java.lang.UnsatisfiedLinkError: isNetworkMonitorActiv

e

at javax.microedition.io.Connector.isNetworkMonitorActive(Native Method)

at javax.microedition.io.Connector.<clinit>(Connector.java:142)

at connectCode.main(connectCode.java:17)

Press any key to continue...

Thanks and Regards,

Cochu.

[1396 byte] By [Cochua] at [2007-11-27 11:09:34]
# 1

http://forum.java.sun.com/ann.jspa?annID=14

ejpa at 2007-7-29 13:36:15 > top of Java-index,Core,Core APIs...
# 2

This forum is for Java generics discussion. The forum you're looking for is probably the Java ME Technologies forum or one of its sub components.

http://forum.java.sun.com/category.jspa?categoryID=23

Anthony_Smitha at 2007-7-29 13:36:15 > top of Java-index,Core,Core APIs...