Are there any Java APIs to find out the JDK version a class file is compiled for? Of course there is the javap tool to find out the major version as mentioned in here. Howev
JavaP does have an API, but it's specific to the Sun JDK.
It's found in tools.jar, under sun/tools/javap/Main.class.
tools.jar
sun/tools/javap/Main.class