第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

短信貓發(fā)送出現(xiàn)CommPortIdentifier class not found錯(cuò)誤

短信貓發(fā)送出現(xiàn)CommPortIdentifier class not found錯(cuò)誤

car 2017-03-10 22:07:50
Caused by: java.lang.RuntimeException: CommPortIdentifier class not found?at org.smslib.helper.CommPortIdentifier.<clinit>(CommPortIdentifier.java:76)?... 4 more但是這個(gè)類org.smslib.helper.CommPortIdentifier我是能找到的?private?static?String?COM;?//短信端口 ????private?static?Service?srv; ????private?static?OutboundMessage?msg; ????static?OutboundNotification?outboundNotification;?//?=?new?OutboundNotification(); ????static?SerialModemGateway?gateway; ????public?static?int?Send(String?PhoneNumber,?String?Content)?{ ????????int?successnumber?=?0; ????????try?{ ????????????? ????????????msg?=?new?OutboundMessage(PhoneNumber,?Content); ??????????//??msg.setEncoding(MessageEncodings.ENCUCS2);?//?中文 ????????????srv.sendMessage(msg); ????????????//判斷發(fā)送狀態(tài) ????????????if?(msg.getMessageStatus().toString().trim().equals("SENT")?||?msg.getMessageStatus().toString().trim().equals("send"))?{ ???????????????++?successnumber; ????????????}?else?{ ????????????????System.out.println("SendMessage-->第"?+?(successnumber?+?1)?+?"條短信發(fā)送短信失敗!"); ????????????} ????????????System.out.println("SendMessage-->發(fā)送短信結(jié)束,成功條數(shù):"?+?successnumber?+?"條,短信內(nèi)容:"?+?Content); ????????????//返回成功數(shù)量 ????????????return?successnumber; ????????}?catch?(Exception?e)?{ ????????????e.printStackTrace(); ????????????System.out.println("SendMessage-->發(fā)送異常??!"); ????????????return?0; ????????} ????} ????public?static?void?Close()?{ ????????try?{ ????????????srv.stopService(); ????????????srv.removeGateway(gateway); ????????????System.out.println("SendMessage-->關(guān)閉短信接口成功!"); ????????}?catch?(GatewayException?e)?{ ????????????e.printStackTrace(); ????????????System.out.println("SendMessage-->關(guān)閉端口出錯(cuò)!"); ????????}?catch?(SMSLibException?e)?{ ????????????e.printStackTrace(); ????????????System.out.println("SendMessage-->關(guān)閉SMSLib錯(cuò)誤!"); ????????}?catch?(IOException?e)?{ ????????????e.printStackTrace(); ????????}?catch?(InterruptedException?e)?{ ????????????e.printStackTrace(); ????????} ????} ????public?class?OutboundNotification?implements?IOutboundMessageNotification?{ ????????public?void?process(AGateway?agateway,?OutboundMessage?outboundmessage)?{ ????????????System.out.println("SendMessage-->Outbound?handler?called?from?Gateway:?"?+?agateway); ????????????System.out.println("SendMessage-->"?+?outboundmessage); ????????} ????} ????static?{ ????????COM?=?"COM3"; ????????srv?=?Service.getInstance(); ????????gateway?=?new?SerialModemGateway("modem."?+?COM.toLowerCase(),?COM,?9600,?"wavecom",?"");?//?設(shè)置端口與波特率 ????????gateway.setInbound(true); ????????gateway.setOutbound(true); ????????gateway.setSimPin("1234"); ????????//gateway.setOutboundNotification(outboundNotification); ????????srv.setOutboundMessageNotification(outboundNotification);?//發(fā)送短信成功后的回調(diào)函方法 ????????try?{ ????????????srv.addGateway(gateway); ????????? ????????????srv.startService(); ????????????System.out.println("SendMessage-->服務(wù)啟動(dòng)成功"); ????????}?catch?(TimeoutException?e)?{ ????????????e.printStackTrace(); ????????}?catch?(GatewayException?e)?{ ????????????e.printStackTrace(); ????????}?catch?(SMSLibException?e)?{ ????????????e.printStackTrace(); ????????}?catch?(IOException?e)?{ ????????????e.printStackTrace(); ????????}?catch?(InterruptedException?e)?{ ????????????e.printStackTrace(); ????????} ????}附上相關(guān)代碼,不知道哪里設(shè)置錯(cuò)了
查看完整描述

3 回答

?
慕虎4106803

TA貢獻(xiàn)1條經(jīng)驗(yàn) 獲得超0個(gè)贊

兄弟處理了嗎問題,我也碰到這問題了。。。是不是因?yàn)閖ar包的版本問題?

查看完整回答
反對(duì) 回復(fù) 2019-01-11
  • 3 回答
  • 0 關(guān)注
  • 3470 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)