1

I am currently engaged in a task where I need to modify an existing .jar file, and have done so several times in the past.

The general flow of this task is to decompile the .jar file using a tool like jd-gui, provide the original .jar file as a resource for the project, and then inject the new .class into the old .jar file.

One thing I am pointedly aware of as being an absolute requirement, however, is that the JRE used to rebuild the class file must be exactly the same as the JRE originally used to create it... But it has been years since I have done this and cannot remember how to find that information.

I need to know how I can discover the JRE used to build a given .class file.

user2149140
  • 143
  • 7
  • 1
    JRE doesn't build class files. JDK builds class files. `javap -v file.class` should tell you the version that was targeted. However, it's possible that a later compiler produced it using the `-target` flag. – Elliott Frisch Mar 28 '18 at 21:11
  • You should post that as an answer. – user2149140 Mar 28 '18 at 21:19

0 Answers0