Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - exception
Search - exception - 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
贪吃蛇手机游戏 贪吃蛇是一款非常经典的手机游戏,本文将使用MIDP实现这款著名的游戏。首先我将介绍下主要用到的七个类:    WormMain:最主要的类,控制所有其它类的运行和销毁。    WormPit:处理键盘输入事件并实例化Worm类和WormFood类的。    Worm:抽象了贪吃蛇的属性和动作    WormFood:抽象了食物的属性和动作    WormScore:用来纪录分数的类    WormLink:抽象了蛇身上的一段,保存了这段的坐标、方向和所有状态。    WormException:处理异常类-Snake mobile game Snake is a very classic cell phone game, this paper will use the MIDP realize this famous game. First of all, I will introduce the main use of the seven categories: WormMain: the most important category, controlling for all other types of running and destroyed. WormPit: handle keyboard input events and Worm instantiated class and WormFood category. Worm: abstract properties of the Snake and movements WormFood: abstract properties of food and movement WormScore: the class used to record scores WormLink: abstract section of the snake body, preserved during the coordinates, direction and all states. WormException: handle exception classes
Date : 2026-01-03 Size : 4kb User : weat

DL : 0
郭克华-J2ME移动开发实战教学视频 8.异常处理 -Guo Ke-hua-J2ME mobile development real teaching video 8. Exception Handling
Date : 2026-01-03 Size : 27.49mb User : 杨明

Description Combination of book reader and Web browsers. This program can be used for Web browsing, reading news sites, downloading and reading books and atricles from the Web. It is not implement all HTML browser functionality - it doesn t show images and is not able to proceed forms. The main idea was to make it possible to view normal sites (not WAP sites) on very small screen of mobile phone. This application share a lot of code with MobiReader and first of all is inteded to be used to browse text data.-Notes # Size of loaded HTML document is limited by amount of memory available for midlet at your mobile phone. The typical limit for used memory is about 100kb for most popular phone models. Series 60 phone have 3Mb limit and new Series 40 phone- about 0.5Mb. Loading too large document will cause OutOfMemory exception. # You can search internet using Google search engine using Web search item from main menu. # Use cursor control keys to scroll text and move between links. UP- one screen backward, DOWN- one screen forward, LEFT- one link or one line backward, RIGHT- one link or one line forward. LEFT and RIGHT keys are used to move between links if is at least one link at the page (marked with black box) or scroll screen one line forward or backward if there are no links. FIRE (ENTER) key cause transfer to the selected link. # If you keep cursor key pressed, autorepeat mode is switched on and text will be scrolled in desired direction until key is released. # Use numeric keys
Date : 2026-01-03 Size : 115kb User : tang

DL : 0
Java语言具有面向对象、平台无关性、安全性、健壮性和多线程等优良特性,为用户提供了良好的程序设计环境,特别适合因特网开发,成为网络时代最重要的语言之一。 本书对Java语言的内容、功能、特性以及实际应用作了深入浅出的全面介绍,对面向对象、多线程、异常处理、Applet程序设计、数据库编程以及网络编程等作了重点阐述,并结合Java的最新发展,对J2EE和J2ME的开发也作了详细介绍。 解压密码:hur.cn或vip.hur.cn-Java language, object oriented, platform independence, security, robustness and multi-threading and other excellent features, provides users with a good programming environment, especially for Internet development, as the language of the Internet age the most important one. Book on the Java language content, features, characteristics and practical applications of a comprehensive introduction to simple terms, object-oriented, multi-threading, exception handling, Applet programming, database programming and network programming were highlights, combined with the Java the latest development, J2EE and J2ME developers are described in detail. Extract password: hur.cn or vip.hur.cn
Date : 2026-01-03 Size : 31.37mb User : xuyuanhe
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.