11-21-2008 03:07 PM
Howdy folks, java newbie here. I've been trying to build a test application that uses the java.net package, but when I import it, the build complains that it doesn't exist. I don't know how RIM's jre does paths, but I have, at the system and user level on my machine, the JAVA_HOME variable set to where I think it should point (c:\program files\java\jre1.6.0_05). When I'm typing out the import line in the .java file, the autocomplete when I type "import java." only shows rmi, lang, io and util, but I just don't know where it's looking. Any help would be appreciated.
11-21-2008 05:44 PM
In short, you're not going to find the java.net package. Remember that the BlackBerry uses Java Micro Edition (J2ME) rather than Java Standard Edition (J2SE). With J2ME you do all your networking via the Connector class in the javax.microedition.io package. Look it up. If, like me, you're coming at this from a desktop software development background you'll probably spend the next hour going "no...they can't be serious" but 2-3 months on it won't seem strange at all. Honest!
12-03-2008 03:30 AM
12-03-2008 07:13 AM
12-03-2008 01:18 PM
I am still finding my way around the BB so if you don't mind I have some beginner questions. I am willing to use anything net.rim*, etc. as long as it leads to a solution:
1. How do you do UTF8 encode of a text string? In java SE they has something call URL.encode() for doing this.
2. How do you implement Map and Hastable as in java.util.Map and java.util.Hashtable?
I think I can stumble around and get the http connection working without the java.net but the above two is now a problem.
thank you for your help!
12-03-2008 09:07 PM
UrlEncodedPostData works beautifully, thank you RexDoug. I am on a roll
Now could I ask another question: how do I setup the screen to display japanese characters?? I am trying to display a hello message and all that I got are boxes and question marks...
12-08-2008 11:46 AM
Support for languages that use non Latin based characters (i.e. Chinese, Japanese) are not supported in all versions of the BlackBerry Simulator. You must use a BlackBerry Simulator that has a version of BlackBerry handheld software that supports these languages.
The BlackBerry Simulator download page will state if a particular version of the BlackBerry Simulator supports one of these languages.
BlackBerry Simulator Download Page: