-1
我想通過黑莓模擬器中的Java程序連接到URL。但它並沒有連接。通過黑莓中的java連接到URL
try {
HttpConnection httpConn;
StreamConnection s;
s = (StreamConnection)Connector.open("http://www.google.com/");
httpConn = (HttpConnection)s;
status = httpConn.getResponseCode();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int t=0;
if (status == HttpConnection.HTTP_OK)
{
add(new RichTextField("Successfully Authorized", Field.NON_FOCUSABLE));
}
有你開始了[MDS模擬器](http://docs.blackberry.com/en/developers/deliverables/5716/The_BB_MDS_Simulator_447180_11.jsp)? –
好故事,兄弟。 –