我想知道如何使用连接到way2sms 的java 程序向手机发送短信。我已经编写了以下程序,但它得到了错误请告诉我需要什么
我添加了way2sms.jar 导入com.way2sms.SMS;
class TestSMS {
public static void main(String[] args) {
SMS smsClient=new SMS();
smsClient.send("userid","password","receiving number","message","proxy");
System.out.println("done");
}
}
我添加了 way2sms.jar 和代理可能是 null 或“”
我收到以下错误:即使我使用了way2sms 网站的有效用户名和密码..
Mar 12, 2012 10:31:26 PM java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002
Windows RegCreateKeyEx(...) returned error code 5.
Logging in ...
Login Failed...
java.io.FileNotFoundException: http://wwwd.way2sms.com//auth.cl
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1303)done
at com.way2sms.SMS.login(SMS.java:132)
at com.way2sms.SMS.send(SMS.java:75)
at sms.TestSMS.main(TestSMS.java:10)