Skip to main content

Error about Connector.open() to open serversocket

1 reply [Last post]
ileti
Offline
Joined: 2005-08-24
Points: 0

Hello,

I want to open serversocket but with

Connector.open( serversocket://:80);

but I get an exception, when I try to open client socket there is no problem (Connector.open( socket://192.168.1.133:80)

Can you help me what is wrong.
---
java.net.UnknownHostException: air-m140-01: air-m140-01
at java.net.InetAddress.getLocalHost(Unknown Source)
at com.sun.cdc.io.j2me.serversocket.Protocol.open(Unknown Source)
at com.sun.cdc.io.ConnectionBase.openPrim(Unknown Source)
at com.sun.cdc.io.InternalConnectorImpl.open(Unknown Source)
at javax.microedition.io.Connector.open(Unknown Source)
at javax.microedition.io.Connector.open(Unknown Source)
at Main.start(Unknown Source)
at Main.main(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)
----

My configuration is

Product: phoneME Advanced (phoneme_advanced_mr2-b34)
Profile: Foundation Profile Specification 1.1
JVM: CVM phoneme_advanced_mr2-b34 (mixed mode)

Thanks..

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Gary Adams

Have you tried "socket://:80"?

phonemeadvanced@mobileandembedded.org wrote:
> Hello,
>
> I want to open serversocket but with
>
> Connector.open( serversocket://:80);
>
> but I get an exception, when I try to open client socket there is no problem (Connector.open( socket://192.168.1.133:80)
>
> Can you help me what is wrong.
> ---
> java.net.UnknownHostException: air-m140-01: air-m140-01
> at java.net.InetAddress.getLocalHost(Unknown Source)
> at com.sun.cdc.io.j2me.serversocket.Protocol.open(Unknown Source)
> at com.sun.cdc.io.ConnectionBase.openPrim(Unknown Source)
> at com.sun.cdc.io.InternalConnectorImpl.open(Unknown Source)
> at javax.microedition.io.Connector.open(Unknown Source)
> at javax.microedition.io.Connector.open(Unknown Source)
> at Main.start(Unknown Source)
> at Main.main(Unknown Source)
> at sun.misc.CVM.runMain(Unknown Source)
> ----
>
> My configuration is
>
> Product: phoneME Advanced (phoneme_advanced_mr2-b34)
> Profile: Foundation Profile Specification 1.1
> JVM: CVM phoneme_advanced_mr2-b34 (mixed mode)
>
>
> Thanks..
> [Message sent by forum member 'ileti' (ileti)]
>
> http://forums.java.net/jive/thread.jspa?messageID=251608
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net