简体   繁体   中英

Blackberry parse String in format yyyy-MM-dd to Date

I've tried using the HttpParserDate.parse method but in one device (Blackberry Pearl 9100) I get the error

Error starting App: Class 'net.rim.device.api.io.http.HttpDateParser' not found.

I'm using the BlackBerry JDE 6.0. Is there a way to parse the date and be available on all devices??

You may have noted that BlackBerry state that you should develop on an OS level that is the same or earlier than the devices you are are targeting. So in this case, because you are using JDE 6.0, you should deploy compiled apps on OS 6.0 devices and above.

You will find a comment to this effect on this page: Eclipse download

I believe that the 9100 was originally released using OS 5.0, but is upgradeable to OS 6.0. To check what level your handset is running, look in the Options - About.

Both OS 5.0 and OS 6.0 contain HttpDateParser. My suspicion in this case is that you have compiled in OS 6.0, so it will not work on a OS 5.0, but your 9100 is running OS 5.0. If so, you have two choices, develop using OS 5.0, or upgrade your 9100.

BTW, I have deliberately given you the download page for Eclipse. I used to use the JDE but Eclipse is a much nicer development environment, if a little more difficult to get to grips with initially. If you are planning to da lot of development, then I would encourage you to try Eclipse, and you can install a JRE to support OS 6.0 and/or OS 5.0. Alternatively, you might want to install JDE 5.0.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM