dcsimg
ALERT: Native method 'com/sun/midp/io/NetworkConnectionBase::initializeInternal' not found
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Michelangelo_Turillo
Posted On:   Friday, September 3, 2004 01:32 AM

Hi at all, anyone knows this error: ALERT: Native method 'com/sun/midp/io/NetworkConnectionBase::initializeInternal' not found! ? I use netbeans to my debug and this is my code for connect a remote webservice: String getViaHttpConnection(String url) throws IOException { HttpConnection c = null; InputStream is = null; StringBuffer str = new StringBuffer(); try { c = (HttpConnection)Connector.open(url); // Get the ContentType //String type = c.getType(); // Getting the InputStream will open the connection // and read the HTTP headers. They are stored until // requested. is = c.openInputStream(); <   More>>

Hi at all,

anyone knows this error: ALERT: Native method
'com/sun/midp/io/NetworkConnectionBase::initializeInternal' not found! ? I
use netbeans to my debug and this is my code for connect a remote
webservice:

			

String getViaHttpConnection(String url) throws IOException {
HttpConnection c = null;
InputStream is = null;
StringBuffer str = new StringBuffer();

try {
c = (HttpConnection)Connector.open(url);

// Get the ContentType
//String type = c.getType();

// Getting the InputStream will open the connection
// and read the HTTP headers. They are stored until
// requested.
is = c.openInputStream(); <--- Close the emulator and show
the error in the subject!


// Get the length and process the data
int len = (int)c.getLength();
int ch;
while ((ch = is.read()) != -1) {
str.append((char)ch);
}

} finally {
if (is != null)
is.close();
if (c != null)
c.close();
}


// Before returning, the resultant String should be parsed to get
Exchange Rate

String val = str.toString();
return val;
}
   <<Less

Re: ALERT: Native method 'com/sun/midp/io/NetworkConnectionBase::initializeInternal' not found

Posted By:   Ronnie_Boy  
Posted On:   Saturday, September 4, 2004 12:03 AM

Hi,

Same problem here. In fact when I think about it, i've had this problem since i installed a Java SDK update from Sun. Maybe they left something out that's causing this problem.

Or have you come up with a solution yet?
About | Sitemap | Contact