Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6214503

Annotate .class files with the version of javac that produced it

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 6
    • tools
    • Cause Known
    • generic
    • generic

      http://forums.java.net/jive/thread.jspa?threadID=63#8886 suggests that the javac compiler annotate generated .class files with a tag that lets subsequent tools determine which javac compiler produced the .class file. The particular request is to know if one is mixing compilers, but a lunch table discussion came up with several other reasons why one might want to know which compiler was used: e.g., experimental versions of the compiler, upon discovering bugs in previous versions of the compiler, etc.

      The tag doesn't have to be non-spoofable: it's just a hint for sane development scenarios.

      Adding the annotation will increase the size of the .class file. It might be good to have a way to aggregate the annotations when building a .jar file.
      ###@###.### 2005-1-06 00:36:07 GMT

            Unassigned Unassigned
            pbk Peter Kessler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: