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();
}
}
}
c18233\AcceptJob.asp
c18233\copyright.asp
c18233\counter\0\0.gif
c18233\counter\0\1.gif
c18233\counter\0\2.gif
c18233\counter\0\3.gif
c18233\counter\0\4.gif
c18233\counter\0\5.gif
c18233\counter\0\6.gif
c18233\counter\0\7.gif
c18233\counter\0\8.gif
c18233\counter\0\9.gif
c18233\counter\0\descript.ion
c18233\counter\0
c18233\counter\1\0.GIF
c18233\counter\1\1.GIF
c18233\counter\1\2.GIF
c18233\counter\1\3.GIF
c18233\counter\1\4.GIF
c18233\counter\1\5.GIF
c18233\counter\1\6.GIF
c18233\counter\1\7.GIF
c18233\counter\1\8.GIF
c18233\counter\1\9.GIF
c18233\counter\1\descript.ion
c18233\counter\1
c18233\counter\2\0.gif
c18233\counter\2\1.gif
c18233\counter\2\2.gif
c18233\counter\2\3.gif
c18233\counter\2\4.gif
c18233\counter\2\5.gif
c18233\counter\2\6.gif
c18233\counter\2\7.gif
c18233\counter\2\8.gif
c18233\counter\2\9.gif
c18233\counter\2\descript.ion
c18233\counter\2
c18233\counter\3\0.gif
c18233\counter\3\1.gif
c18233\counter\3\2.gif
c18233\counter\3\3.gif
c18233\counter\3\4.gif
c18233\counter\3\5.gif
c18233\counter\3\6.gif
c18233\counter\3\7.gif
c18233\counter\3\8.gif
c18233\counter\3\9.gif
c18233\counter\3\descript.ion
c18233\counter\3
c18233\counter\4\0.gif
c18233\counter\4\1.gif
c18233\counter\4\2.gif
c18233\counter\4\3.gif
c18233\counter\4\4.gif
c18233\counter\4\5.gif
c18233\counter\4\6.gif
c18233\counter\4\7.gif
c18233\counter\4\8.gif
c18233\counter\4\9.gif
c18233\counter\4\descript.ion
c18233\counter\4
c18233\counter\5\0.gif
c18233\counter\5\1.gif
c18233\counter\5\2.gif
c18233\counter\5\3.gif
c18233\counter\5\4.gif
c18233\counter\5\5.gif
c18233\counter\5\6.gif
c18233\counter\5\7.gif
c18233\counter\5\8.gif
c18233\counter\5\9.gif
c18233\counter\5\descript.ion
c18233\counter\5
c18233\counter\6\0.gif
c18233\counter\6\1.gif
c18233\counter\6\2.gif
c18233\counter\6\3.gif
c18233\counter\6\4.gif
c18233\counter\6\5.gif
c18233\counter\6\6.gif
c18233\counter\6\7.gif
c18233\counter\6\8.gif
c18233\counter\6\9.gif
c18233\counter\6\descript.ion
c18233\counter\6
c18233\counter\7\0.gif
c18233\counter\7\1.gif
c18233\counter\7\2.gif
c18233\counter\7\3.gif
c18233\counter\7\4.gif
c18233\counter\7\5.gif
c18233\counter\7\6.gif
c18233\counter\7\7.gif
c18233\counter\7\8.gif
c18233\counter\7\9.gif
c18233\counter\7\descript.ion
c18233\counter\7
c18233\counter\count.txt
c18233\counter\Counter.asp
c18233\counter
c18233\css\css.css
c18233\css
c18233\data\admin.mdb
c18233\data
c18233\editor.asp
c18233\Foot.asp
c18233\head.asp
c18233\Images\1.jpg
c18233\Images\2.jpg
c18233\Images\32.swf
c18233\Images\an.gif
c18233\Images\banner.gif
c18233\Images\bg.gif
c18233\Images\bgmenu.gif
c18233\Images\greenaccept.gif
c18233\Images\ground.gif
c18233\Images\hr.jpg
c18233\Images\line.gif
c18233\Images\link.gif
c18233\Images\ljsq.gif
c18233\Images\logo.gif
c18233\Images\menu.swf
c18233\Images\title.gif
c18233\Images\topBar_bg.gif
c18233\Images\topbg.gif
c18233\Images\top_bg.gif
c18233\Images\voteSubmit.gif
c18233\Images\voteView.gif
c18233\Images\zhao.gif
c18233\Images
c18233\Img\1x1_pix.gif
c18233\Img\agri__76.jpg
c18233\Img\agri__78.jpg
c18233\Img\agri__80.jpg
c18233\Img\arrow_1.gif
c18233\Img\arrow_2.gif
c18233\Img\arrow_4.gif
c18233\Img\arrow_5.gif
c18233\Img\arrow_6.gif
c18233\Img\arrow_down.gif
c18233\Img\bgg.jpg
c18233\Img\bg_1.jpg
c18233\Img\foot.jpg
c18233\Img\foot1.jpg
c18233\Img\head_bg.gif
c18233\Img\head_bg1.gif
c18233\Img
c18233\in.asp
c18233\Inc\articleCHAR.INC
c18233\Inc\config.asp
c18233\Inc\Conn.asp
c18233\Inc\conndb.asp
c18233\Inc\Css.css
c18233\Inc\eshopcode.asp
c18233\Inc\Eshopcode.js
c18233\Inc\function.asp
c18233\Inc\md5.asp
c18233\Inc\shezhi.asp
c18233\Inc\syscode.asp
c18233\Inc\Top.asp
c18233\Inc\tou.asp
c18233\Inc\Ubb.inc
c18233\Inc\ubbcode.asp
c18233\Inc\upload.asp
c18233\Inc\Util.asp
c18233\Inc
c18233\index.asp
c18233\Job.asp
c18233\Jobs.asp
c18233\Manage\addmanagerok.asp
c18233\Manage\admin\admin.mdb
c18233\Manage\admin
c18233\Manage\Admin.asp
c18233\Manage\Conn.asp
c18233\Manage\Conndb.asp
c18233\Manage\Deljobbook.asp
c18233\Manage\Delmanager.asp
c18233\Manage\Delorderlist.asp
c18233\Manage\Foot.asp
c18233\Manage\head.asp