java_learner
java_learner

Reputation: 182

Unsupported major.minor version. Possibility of recompiling jars

I am new to java so I dont know if my question makes sense. I have a jar which I got from another developer and this jar is compiled in java 1.7 and I am using 1.6. So when I run this application, it gives me a Unsupported major.minor version error. So,I would like to know is there a way that I can recompile the jar in 1.6 somehow? I cannot update my java version to 1.7 because, the development system cannot be connected to internet.

Thanks

Upvotes: 0

Views: 157

Answers (1)

Andreas Fester
Andreas Fester

Reputation: 36630

There are some approaches like Retrotranslater, but it seems that it has not been updated for 1.7 => 1.6 (we used this some years ago for 1.5 => 1.4 or similar).

The general advice is to compile the source code with 1.6 (which should be easy if no 1.7 specific features are used).

Otherwise, you should really consider updating your java version to 1.7 somehow, since 1.6 is at its end of life already. Even if your development system is isolated, there must be some connectivity since somehow you also transferred the jar file from the other developer. With the same approach, you should be able to transfer the JDK installation package.

See also this question for more background information: Compiling Java 7 to Java 6

Upvotes: 2

Related Questions