0

I have class file. It is a result of compilation. Can I know the compiler version which was used for creation of this file?

As a result I want to know something like java 1.6.0_45

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

2 Answers2

2

No. Class file contains only format version which is not directly corresponds to compiler version.

PS: Class files mainly can be found inside jars. Jars often contains manifests. Manifest may contain compiler version.

PPS: See also here

Community
  • 1
  • 1
talex
  • 17,973
  • 3
  • 29
  • 66
-1

Yes, that information is part of class file. More information here.

Edit: I stand corrected. The compiler version is not part of the class file. I confused major and minor versions with compiler version. Still keeping the link since it provides useful information pertaining to the question.

Varun Phadnis
  • 671
  • 4
  • 6
  • 2
    No it doesnt. If you read you own link you will see that onli class file format version is stored – talex Sep 03 '14 at 15:20