View Single Post
Old 05-19-2012, 05:30 PM   #130
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by aditya3098 View Post
The output of showlog -f is attached
Here is your problem:

Code:
java.lang.NoClassDefFoundError: java.lang.StringBuilder
You are obviously building the project with the wrong settings. The Kindle is Java 1.4, and that class doesn't exist in 1.4. Fix your project settings to compile with a target version of 1.4.

Some more background: this is a classic actually (and it happened to me too, more than once ). The problem here is String concatenation. String s = "x"+"y"; is internally "resolved" by instantiating a StringBuilder (>= Java 5), or a StringBuffer ( <= Java 1.4).

StringBuilder was introduced in Java 1.5 as a more performant drop-in replacement for the (Thread-safe, and thus less performant) StringBuffer class.
ixtab is offline   Reply With Quote