Sunday, June 10, 2007

Eclipse Error Preverifying Class

I kept getting an error in Eclipse: Error Preverifying Class in JSONArray.java. Sun's website (http://java.sun.com/products/sjwtoolkit/FAQ.html) revealed some useful info regarding the class libraries used in projects:

"If you get this error, you are probably using a class library that was written for Java 2 Platform, Standard Edition (J2SE™ platform). This toolkit supports the development of MIDP applications, which have limited capabilities compared to their J2SE counterparts."

Turns out Eclipse was configured to use an older preverifier and was unaware of java.io.Writer. To fix this, I went to Window > Preferences > J2ME > Preverification > Use specific configuration > Connected Limited Device Configuration (1.1).

No comments: