json.me warning can't find referenced class java.lang.StringBuilder
Hey Hi Friends
I have uses json.me package of json in my j2me project but when i
have uses 开发者_如何学JAVAthe object
JSONObject jsonresp=new JSONObject(respstring)
it shows warning
can't find referenced class java.lang.StringBuilder
Error: Please correct the above warnings first.
D:\Sajid\J2MeProj1\nbproject\build-impl.xml:432: Obfuscation failed with error code 1.
BUILD FAILED (total time: 2 seconds)
can any one give me idea how to remove this warning
Is respstring
a StringBuilder
? Because that class didn't make its appearance until Java 1.5, so with ME you'll have to use StringBuffer
.
I guess you are compiling against JavaSE 1.5 and obfuscator does not like that. Make sure that you have compiled the code with Java compliance level to 1.3 or 1.4. Also remember to use the -bootclasspath option to instruct the compiler to use the J2ME classes instead of the J2SE ones. You can get the J2ME classes from WTK.
Hey Hi guy's this error because of i have used old version of json.me compiled with jdk1.4.* so now i have compiled with jdk1.6.* & making its jar so its working fine thanks all friends.
精彩评论