Re: class file has wrong version 49.0, should be 48.0



On Wed, 27 Jun 2007 09:47:22 +0200, Petterson Mikael
<mikael@xxxxxxxxxxxxxx> wrote, quoted or indirectly quoted someone who
said :

I have downloaded a 3:rd party jar file. When I try to run my code (
using the API) I get the following error:

class file has wrong version 49.0, should be 48.0

AFAIK: The class file i generated using jdk 1.5 and I try to execute it
using jdk 1.4.

I cannot change jdk but use 1.4 ( sniff).

The provider of the jar file has the following requirements:

Requirements
Java2HTML is written in Java and therefore needs a Java 1.1 or above
compatible JVM

Is there a way around this?

He has presumably used JDK 1.5 features and methods not available in
JDK 1.4. What can you do?

1. upgrade to JDK 1.6.
see http://mindprod.com/jgloss/jdk.html
JDK 1.4 came out 2002-02-13. That is 5 years ago an extremely long
time in net years. That was even before the Iraq war started.

2. decompile the code, and modify it to avoid JDK 1.5 features. If
you are lucky there won't be any. Any Genericity disappears on
decompilation. see http://mindprod.com/jgloss/decompiler.html


--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.



Relevant Pages

  • Re: JDK Linux installation help!
    ... I'm pulling my hair out with the Sun JDK installation on Fedora 7. ... Recently, I decided to explore java and downloaded their product, ... (unrecognized class file version) ... You installed a recent JDK, and that's where you're running javac from. ...
    (comp.lang.java.programmer)
  • Re: -verbose:class and java.lang.Object[]
    ... On my Sun JDK I get ... I am thinking why there is no such class file corresponding to array ... instead (it works on my Sun JDK). ... I also find that the super class of these array classes is java.lang.Object. ...
    (comp.lang.java.programmer)
  • Re: NetBeans IDE classpath (?)
    ... Paul C. wrote: ... > My question is how do I import/use a .class file I made myself? ... > successfully in JDK 1.3. ...
    (comp.lang.java.programmer)
  • find out JDK version of .class file
    ... I would like to find out the JDK version with which a .class file ... has been built. ... Wikipedia tells me that the minor version number ...
    (comp.lang.java)
  • Re: Unusual Error Message
    ... compiled on machnie B. A & B have different jdk. ... bad constant type in class file com_xyz_practice/CrunchBracketSchedule ...
    (comp.lang.java.programmer)