开发者

Warning: org.json.me.JSONArray: can't find referenced class java.lang.StringBuilder

Warning: org.json.me.JSONArray: can't find referenced class java.lang.StringBuilder

I have checked all java file of json.me but in that no java.lang.StringBuilder is used

I got this warning when I am compiling 开发者_JAVA技巧my j2me project.

How to remove this warning from project. I got this json.me from this link Download link of json.me

Please give me solution about that. Thanks


java.lang.StringBuilder is found in the JDK. I think StringBuffer is available in Java ME. Use that instead.

Also, I checked the code from the link provided, I see no reference to StringBuilder but I see references to StringBuffer.


I encountered this error learning j2me right now. Fixed it by adding a compiler flag: 'javac -source 1.4 ....' .

The reason is, Java 1.5+ uses StringBuilder which replaces StringBuffer. But JavaME implementation doesn't have the StringBuilder, it requires using the old StringBuffer for the same operations. So compile your J2ME class as Java 1.4 so it uses the old method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜