Skip to main content

Use the split function in phoneme Advanced Personal Profile

7 replies [Last post]
mkant
Offline
Joined: 2010-02-03

Hello,

I use "phoneme Advanced Personal Profile".
Now I use the split function of the java.lang.String.
But on the mobile device comes a error:
java.lang.nosuchmethoderror:java.lang.String: method split(Ljava/lang/String;)[Ljava/lang/String; not found

Can anybody help me?

Thank you very much.

Best regards,

Mathias

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jldominguez
Offline
Joined: 2008-01-02

I think you can use the static method split2 (the last one) from this class:

http://subversion.gvsig.org/gvSIG-mobile/pilots/branches/pilot2/librarie...

Regards,
Juan Lucas

Message was edited by: jldominguez

seb64
Offline
Joined: 2008-10-02

Another easy way is to use the regexp package from the jakarta project:

http://jakarta.apache.org/regexp/index.html

It can easily replace the functionnality of the java regexp package and works with Personal Profile (I haven't tried it on other profiles).

Or if you want to go the really hard way, you could use a bytecode modification tool like retrocompiler to insert a backport of the java.util.regex package inside your application (backport which you would have to write by the way).

cjplummer
Offline
Joined: 2006-10-16

String.split() is not included in the CDC, FP, or PP specs, so you won't be able to use it with phoneME.

mkant
Offline
Joined: 2010-02-03

Why is this practical method not in the phone me Project?
Is there no way to add this to phoneme?

cjplummer
Offline
Joined: 2006-10-16

> Why is this practical method not in the phone me
> Project?

Because it pulls in the RegEx package, which was deemed to be too big for J2ME.

> Is there no way to add this to phoneme?

Through the JCP process. The engineering part is probably not that hard, but J2ME needs to be spec compliant, so this prevents simply adding new APIs, even if they are trivial and useful.

mkant
Offline
Joined: 2010-02-03

By the way, Do you know how to set up a emulator for phoneme advanced Personal Profile in Netbeans? At the moment I can test it only on the mobile device.

Thank you very much.

Best regards,

Mathias

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> By the way, Do you know how to set up a emulator for phoneme advanced Personal Profile in Netbeans? At the moment I can test it only on the mobile device.
>
> Thank you very much.
>
>
>

Hi Mathias,

Please try these NB instructions for running a Personal Profile app in
NetBeans:

http://netbeans.org/kb/docs/javame/cdc-quickstart.html#personal

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net