(真是有中国特色的J2ME编程啊……-_-!)
/**
* sample code of http connecting via CMWAP
* @author clapton_xpAThotmailDOTcom
* assume that you gonna connect to http://www.yourdomain.com/yourdir/your.file
*/
String CMCC_PROXY="http://10.0.0.172:80/"; //这个是中国移动的代理
HttpConnection c = null;
c = (HttpConnection) Connector.open(CMCC_PROXY+"yourdir/your.file");
c.setRequestProperty("X-Online-Host", "www.yourdomain.com"); //这个是关键所在
// deal with connection
is = c.openInputStream();
//..............后面都一样了
本文地址:http://com.8s8s.com/it/it16230.htm