Skip to content

Error: class file has wrong version 48.0, should be 47.0

This is one of the few entries I have written in English, so typos etc. will be present :-)

The reason that I'm writing this in English and not in Danish is that this problem is somewhat documented on the net - but I would also like to contribute.

So, why do I get a class file has wrong version 48.0, should be 47.0 error? The reason for this is that you are using JDK 1.4 to build your project. This is fine, but somewhere in your build process you are using JDK 1.3. The problem emerges as a conflict between these two versions. In my case JDK 1.4 called the JDK 1.3 javac which then tried to use JDK 1.4's rt.jar file. As JDK 1.3 doesn't understand the 1.4's specification (major/minor version) it throws a class file has wrong version 48.0, should be 47.0.

The solution was to compile the entire system with JDK 1.4. But notice that some parts of your system might have to be compiled using 1.3, and therefore this solution is not viable for you. In this case you must identify what parts need to be compiled with 1.3 and what parts need 1.4 and use verify that you are doing this correctly. This, of course, depends on your build method.


No Trackbacks


Display comments as Linear | Threaded

No comments

The author does not allow comments to this entry

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.
Form options