Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 1
Registered: ‎02-08-2009
My Device: Not Specified

8820 TCP Connection Exception: java.lang.NumberFormatException

Hi all,

I use socket to open an url and download the data, the url is

m_url = socket://xx.xx.xx:2009/vdata.v



it  works greate on jde 4.5 8820 emulator, but when i run it on real bb 8820 device(OS version:v4.5.0.81)

it throws an exception when call Connector.open(m_url)


java.lang.NumberFormatException: 2009/vdata.v



it seems when Connector.open parse the host&port,

it just use ':' to simply split the m_url, and doesn't check the '\' stuff~


so can any one give me any advices?


Many Thanks!


Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: 8820 TCP Connection Exception: java.lang.NumberFormatException

An example of a socket connection with the full APN info provided:




I don't understand what the "/vdata.v" is supposed to represent in your code snippet. Whatever it is, I don't think it belongs there.


You should review these documents from the knowledgebase:






Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: 8820 TCP Connection Exception: java.lang.NumberFormatException

LOL- I'm glad it didn't throw an assertion failure suggesting OCD attitudes here too.

Number conversion in java is annoying since atoi in C seems to ignore trailing junk and I hate

to keep using trim(). In any case, you make a socket connection to an IP address or perhaps

an interface, not a url.