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 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
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.
java.lang.StringBuilder
is found in the JDK. I thinkStringBuffer
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 toStringBuffer
.