Version 3

    Sometimes, you have a .class file and you need to know what version of java it was compiled for.  Each java class file contains a Minor Version and a Major Version.  The Minor Version is usually not relevant, but the Major Version will tell you if the class was compiled with JDK 1.3, 1.4, 1.5, etc.  Using a bytecode viewer, you look at the Major Version and refer to the following chart to find the JDK version it was compiled for.

     

    JDK

    Major Version

    1.1

    45

    1.2

    46

    1.3

    47

    1.4

    48

    1.5

    49

    1.6

    50

     

    A nice GPL bytecode viewer is jclasslib.