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.
A nice GPL bytecode viewer is jclasslib.