Check Java Binary Version
檢視Java Binary File編譯版本
方法一:
>javap -verbose Employee
Compiled from "Employee.java"
public class test.Employee extends java.lang.Object
SourceFile: "Employee.java"
minor version: 0
major version: 50
Constant pool:
.....
方法二:
使用文字工具開啟class檔案,檢視前面的binary code
javac -target 1.1
==> CA FE BA BE 00 03 00 2D
javac -target 1.2
==> CA FE BA BE 00 00 00 2E
javac -target 1.3
==> CA FE BA BE 00 00 00 2F
javac -target 1.4
==> CA FE BA BE 00 00 00 30
看起來新版本就往下推最後一碼了... :P