Search code examples
javajardowngrade

How to downgrade version of jar file without the project?


I have an old jar file with my library which use jdk 1.7.0_03. But on my new computer I did't have applicable version of jdk. My current version is 1.6. Is it possible to downgrade version of jar file (1.7 -> 1.6) without project source files so that my jar file could run on java 1.6?


Solution

  • You can try to unpack a jar file with the "jar" CLI Tool and change the Version in the Manifest file. Then you need to Repack the file again. This worked for me once with an OSGi Bundle.