Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - INT 1
Search - INT 1 - List

1、将jre文件夹复制到你本机所在的JDK下覆盖掉全部jre文件夹

2、将lib文件夹复制到你项目所在的lib,添加对应lib


import org.smslib.IOutboundMessageNotification;
import org.smslib.Library;
import org.smslib.MessageEncodings;
import org.smslib.MessageProtocols;
import org.smslib.OutboundMessage;
import org.smslib.Service;
import org.smslib.modem.SerialModemGateway;
import java.util.List;


public class SendSms {
    public SendSms() {
    }


    public void sendSMS(String[] phoneNumber) throws Exception {
        Service srv;
        OutboundMessage msg;

        OutboundNotification outboundNotification = new OutboundNotification();

        srv = new Service();
        SerialModemGateway gateway = new SerialModemGateway("modem.com1",
                "COM1", 9600, null, null);
        gateway.setInbound(true);
        gateway.setOutbound(true);
        gateway.setSimPin("0000");
        gateway.setOutboundNotification(outboundNotification);
        gateway.setProtocol(MessageProtocols.PDU);
        srv.addGateway(gateway);

        try {
            srv.startService();

            for (int i = 0; i < phoneNumber.length; i++) {
                msg = new OutboundMessage(phoneNumber[i], "您有会议待处理,请登陆查看!");
                msg.setEncoding(MessageEncodings.ENCUCS2);
                srv.sendMessage(msg);

            }

        } finally {
            srv.stopService();
        }
    }

    public class OutboundNotification implements IOutboundMessageNotification {
        public void process(String gatewayId, OutboundMessage msg) {
            System.out.println("Outbound handler called from Gateway: " +
                               gatewayId);
            System.out.println(msg);
        }
    }


    public static void main(String args[]) {
        SendSms app = new SendSms();
        try {
            app.doIt();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
 


Date : 2009-01-03 Size : 1015.8kb User : idhuanghao

DL : 0
java的一个源代码,、 public class ThunderBoltAct extends Canvas implements Runnable { private int TIMEOUT = 0 private final static int NUMERIC = 10000 //总分 private final static int INERRGAL = 60 //频率 private final static int MAXBATTLE = 3 //最大飞机数 private final static int MAXBALLNUM = 30 //最多飞机子弹数 private final static int MAXCOPTERNUM = 16 //最大敌机数 private final static int MAXCOPTERBALLNUM = 16 //最多敌机子弹数 private final static int STEP = 1 private final static int MINCOPTER = 2 //最小敌机数-java source code of a,, public class ThunderBoltAct extends Canvas implements Runnable (private int TIMEOUT = 0 private final static int NUMERIC = 10000// total private final static int INERRGAL = 60// frequency of private final static int MAXBATTLE = 3// the largest number of aircraft private final static int MAXBALLNUM = 30// maximum number of aircraft bullets private final static int MAXCOPTERNUM = 16// maximum number of enemy private final static int MAXCOPTERBALLNUM = 16// maximum number of enemy bullets private final static int STEP = 1 private final static int MINCOPTER = 2// minimum number of aircraft
Date : 2026-01-07 Size : 21kb User : ossroot

Basic j2me utils with: FileConnector.java - read, write files, get the listRoot, etc... Conversion.java - encodeURL, base64 encode and get HTMLHex of int. DateOperations.java - Date Manager. GaugeProcess.java - for Gauge process. Phone.java - Get informations of device.-Basic j2me utils with: FileConnector.java - read, write files, get the listRoot, etc... Conversion.java - encodeURL, base64 encode and get HTMLHex of int. DateOperations.java - Date Manager. GaugeProcess.java - for Gauge process. Phone.java - Get informations of device.
Date : 2026-01-07 Size : 8kb User : Rhay
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.