• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

httpconnection on Palm: INET: Couldn't init InetLib -1, 1290

 
torello torello
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does anyone encountered (and solved if possible :-) this kind of error on Palm (emulator)
KVM stdout: 28 mag 2001, 11:01
Inet.java loaded
INET: Couldn't init InetLib -1, 1290
java.lang.RuntimeException: Inet not initialized

trying to realize a remote connection using such a method:
protected void connect() {
try {
setStatus("Connecting...");
String url = mUrlField.getText();
HttpConnection c = null;
InputStream s = null;
StringBuffer b = new StringBuffer();
TextBox t = null;
try {
c = (HttpConnection)Connector.open(url);
c.setRequestMethod(HttpConnection.GET);

//s = c.openInputStream();
s = c.openDataInputStream();
int ch;
while((ch = s.read()) != -1) {
b.append((char) ch);
}
System.out.println(b.toString());
//t = new TextBox("hello....",b.toString(), 1024, 0);
}
catch (IOException ioe) {
setStatus("Connection failed: " + ioe.toString());
}
finally {
if(s != null) {
s.close();
}
if(c != null) {
c.close();
}
}//try

setStatus("Connected to " +url);

s.close();
}
catch (IOException ioe) {
setStatus("Connection failed: " + ioe.toString());
}
}
does anyone got some useful tips for this matter ??
thanks in advance
torello
 
Eric Giguere
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
InetLib is used by the Palm VII to do wireless communications, so you need to have a Palm VII ROM loaded into the emulator and have the emulated device properly configured to use the Palm web clipping server. The alternative is to use the "testhttp:" protocol instead of "http:", it uses the normal NetLib stuff.
Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic