How to use J2SE classes in blackberry application?
I want to use java.io.FileInputStream, java.io.FileOutputStream, java.io.Object开发者_JS百科InputStream, java.io.ObjectOutputStream classes in my blackberry project. But blackberry supports J2ME[i.e. CLDC], which doesn't contain these classes. Is there any solution to this problem? How to use these classes in blackberry project? Thanks in advance.
Well, the only way you could use J2SE classes in your project is to re-implement those classes using the provided J2ME core classes. This would be very messy, would probably take a long time and would be rather error prone but it could be done.
You are better served using the classes provided by the CLDC. It does affect code portability but...its a phone: there is a limit to how portable you're going to get.
精彩评论