utilMDE
Class ClassFileVersion
Object
ClassFileVersion
public class ClassFileVersion
- extends Object
Given a list of .class files, print the class file version and also the
JDK/JRE version required to run it.
A .jar file can also be supplied, in which case each .class file within
it is procesed.
Example use: java ClassFileVersion MyClass.class
Supplying the "-min JDKVER" argument suppresses output except for .class
files that require at least that JDK version. For instance, to list all
the .class/.jar files that require JDK 6 or later, in this or any
subdirectory, run
find . \( -name '*.class' -o -name '*.jar' \) -print | xargs java ClassFileVersion -min 6
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassFileVersion
public ClassFileVersion()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
processClassFile
public static void processClassFile(String filename,
InputStream is)
versionNumbers
public static double[] versionNumbers(InputStream is)
- Returns null if there is an error or the input isn't a class file.