Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MIDP networking problem

 
Tommy Tucker
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'am using suns MIDP package to do some network programming on fedora (running from the command line not the wireless toolkit). My problem is that I cannot open a connection of any kind. If i try http, socket or serversocket i keep getting the following exception javax.microedition.io.ConnectionNotFoundException saying the protocol does not exist. But the classes to support the protocols are in the package. I was wondering if any knew if this problem was related to linux or is there someother reason for it.

Thanks in advance

Tom
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well usually a ConnectionNotFound is because 1. That service is not available on the device, which has nothing to do with adding classes to a Jar file. 2. the server address does not exist.

Mark
 
Tommy Tucker
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for that Mark
The reason I mentioned the class files is that i thought if they were in the classes folder then the protocol would be supported. for example if the SocketConnection.class is in the package then there should be no prob opening up a socket connection. Not sure if this is the case.
I am using the Sun midp2 package and trying to setup a socket connection to listen for requests. The line of code thats throwing the exception is as follows StreamConnectionNotifier serverSocket = (StreamConnectionNotifier)Connector.open("socket://8000");. I have no problem setting up socket connections when using the java.net packege it when i want to use the javax.microedition.io package i start running into problems. I was wonder could anyone give me pointers as to what could be causing this??

Thanks in advance
Tom
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic