java-se to j2me

Java programming topics
Post Reply
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

java-se to j2me

Post by Rksk » Thu Jan 14, 2010 7:47 pm

Dear expert,

I tried to convert a java-se code to j2me.
it success some what, but the following line is not work on j2me.

int charAt = Integer.parseInt((new StringBuilder()).append("").append(NUM.charAt(i)).toString());

I have attached the full class. Please help.
java.zip
MY CLASS
(563 Bytes) Downloaded 454 times
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: java-se to j2me

Post by Neo » Sat Jan 16, 2010 4:14 am

According to what I have found, all these functions are working fine in J2ME.
Can you check each function separately with error handling (try/catch) to see where is the problem.
When you find the problematic part, post it here so we can check on that.
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: java-se to j2me

Post by Rksk » Sat Jan 16, 2010 9:58 pm

Thank you, i'll try and reply.
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: java-se to j2me

Post by Rksk » Sun Jan 17, 2010 3:42 pm

Dear expert,
I fogot to tell that, the above line shows an error in J2ME SDK 3.0 as below,

cannot find symbol
symbol: constructor StringBuilder()
location: class StringBuilder

cannot find symbol
symbol: class StringBuilder
location: class Verifier
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: java-se to j2me

Post by Neo » Mon Jan 18, 2010 12:08 am

StringBuilder isn't available in J2ME. Use StringBuffer instead.
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: java-se to j2me

Post by Rksk » Thu Jan 21, 2010 4:22 pm

Thanks a lot, it is ok.
you can see my product, visit <link removed> and download "Master password generator for nokia".

thank you again.
Last edited by Neo on Thu Jan 21, 2010 5:26 pm, edited 2 times in total.
Reason: Unrelated link to topic (Instructed the user to put the page under Member Advertising)
User avatar
MacdaOriri
Posts: 1
Joined: Sat Jun 23, 2012 1:16 pm

Re: LWUIT Dialog

Post by MacdaOriri » Sat Jun 23, 2012 1:23 pm

How do I add command buttons to a dialog using LWUIT???
Post Reply

Return to “Java Programming”