httpConnect 问题
当打包把程序放到真机上时,出现如下错误
javax.microedition.io.connectionnotfoundexception
url是一个公网可访问的路径。
请各位高手解决一下。
============源代码如下=================
import java.io.*;
import java.util.Vector;
import org.kxml2.io.*;
import org.xmlpull.v1.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
public class Newsreader extends MIDlet implements CommandListener {
// static final String URL = "http://***.***.***.***:8100/asp/build.xml ";
static final String URL = "http://***.***.***.***:8100/asp/asptest.asp ";
// "http://www.newsforge.com/newsforge.xml ";
static final String TITLE = "NewsForge ";
Vector descriptions = new Vector();
List newsList = new List(TITLE, Choice.IMPLICIT);
TextBox textBox = new TextBox( " ", " ", 256, TextField.ANY);
Display display;
Command backCmd = new Command( "Back ", Command.BACK, 0);
Command backExit = new Command( "Exit ", Command.EXIT, 0);
class ReadThread extends Thread {
public void run() {
HttpConnection httpConnection = null;
try {