在jar包中,用winrar解压一个类文件,然后在命令行下面输入
javap-verboseclassname
会输出一些信息,大致如下:
Compiledfrom"HtmlCrawer.java"
publicclassorg.eagleeye.html.HtmlCrawerextendsjava.lang.Object
SourceFile:"HtmlCrawer.java"
minorversion:0
majorversion:50
Constantpool:
const#1=class#2;//org/eagleeye/html/HtmlCrawer
const#2=Ascizorg/eagleeye/html/HtmlCrawer;
const#3=class#4;//java.lang/Object
const#4=Ascizjava.lang/Object;
const#5=Ascizclient;
....
后面省略了,可以看到前面有两行:
minorversion:0
majorversion:50
表示了类文件的版本