Solution: StringTokenizer in J2ME JavaME MIDlets
|
|
JavaME is perhaps the most portable way to develop application for mobile and limited devices, however due to compactness and simplicity most of the classes that present on normal Java Virtual Machine are not included in the MIDlet VM.
One of the classes is StringTokenizer which is used to break a string into tokens. I've stumbled into this exact problem too when I was developing an application that parses input from a remote server back in 2001. I searched for an alternative and finally settled on modifying Ostermiller StringTokenizer implementation which works perfectly for my purposes.
How to enable StringTokenizer in J2ME ?
To use StringTokenizer in your project, you need to download this class file StringTokenzer, and unzip it in your application source folder.
Then import it into your source code, and use it like a normal Java SE StringTokenizer implementation
-
import net.mypapit.java.StringTokenizer;
-
.
-
.
-
.
-
.
-
String firstToken;
-
StringTokenizer tok;
-
-
firstToken= tok.nextToken();
That's it! Happy coding!
Download : J2ME StringTokenizer
Download : StringTokenizer Demo App
Tags: j2me, javame, midlet, mobile, stringtokenizer, phone, nokia
|
|






tag this
December 31st, 1969 at 4:00 pm
Solution: StringTokenizer in J2ME JavaME MIDlets Turn your Pocket PC PDA into iPhone with iContact Install J2ME / JavaME Midlet Manager in Pocket PC PDA
August 28th, 2007 at 3:49 am
Dear sir ,
i need to DTMF tone generate from the mobile key pad then play..tell some idea
how to set and generate the DTMF tone from the motorola cell using J2ME
please reply me
with regards,
krishnakumar.P
November 25th, 2007 at 6:56 pm
Hi!
Link to zip file is broken!
regards,
zm
July 7th, 2008 at 11:08 am
Yes, link to zip file is error!
Please fix it, thanks