短信猫java开发实例java开发实例:具体的操作步骤如下:1、把smslib--,放入到工程的lib中;2、%JAVA_HOME%/jre/lib下;3、.dll放到%JAVA_HOME%/jre/bin下;%JAVA_HOME%/jre/ext下注意:路径放错,调用起来就会报错;JDK的版本,用的版本是jdk-1_5_0_04。这样配置好了,运行下面的代码就可以发短息了,具体的代码如下:.;.;.、ndMessage;.;.;.;lassSendMessage{lassOutboundNotificationimplementsIOutboundMessageNotification{publicvoidprocess(StringgatewayId,OutboundMessagemsg){("OutboundhandlercalledfromGateway:"+gatewayId);(msg);}}***@SuppressWarnings("deprecation")publicvoidsendSMS(StringmobilePhones,Stringcontent){Servicesrv;OutboundMessagemsg;OutboundNotificationoutboundNotification=newOutboundNotification();srv=newService();SerialModemGatewaygateway=newSerialModemGateway("3","COM3",9600,"","");//(true);(true);("0000");(outboundNotification);(gateway);("初始化成功,准备开启服务");try{();("服务启动成功");String[]phones=(",");for(inti=0;i<;i++){msg=newOutboundMessage(phones[i],content);();//(msg);}();}catch(Exceptione){();}}public
短信猫jva开发说明 来自淘豆网m.daumloan.com转载请标明出处.