Java: java/lang/ClassFormatError: Bad version information

February 2, 2011 in IT and Stuff

I have just started to build a J2ME application again after neglect it for about 4 years. I use EasyEclipse for Mobile Java and it is cool! *sort of speak :D

But anyway when I tried to run the example application it returns error

java/lang/ClassFormatError: Bad version information

If you encountered this kind of error message, don’t panic. It means that the compiler you are using is not compatible with what you have.

So just change the compiler version to 1.4 and it will work like a charm (at least mine does :P )

Happy coding!

I love my life! Groetje van Pink!  Muach!

Initialize logging

November 10, 2009 in IT and Stuff

someJavaClass.java

public class someJavaClass {
private static Log log = LogFactory.getLog(someJavaClass.class);

}

In the log4j.properties define the log properties you want to display such as

log4j.rootLogger = DEBUG
log4j.appender.site = org.apache.log4j.FileAppender
log4j.appender.site.file = C:yourLogFile.log
log4j.appender.site.layout = org.apache.log4j.PatternLayout
log4j.appender.site.layout.conversionPattern = %d [%t] %-5p %c – %m%n
log4j.appender.site.append = false