????JDK??Java???????????????????????????????Java???????????????????JDK???????????????????????ī????java.exe??javac.exe??jar???????????????????Щ???????????Joe??ж????Java???????飬???????????????????£?5 JDK Tools Every Java Developer Should Know???????????????????????????
?????????????????????Java JDK???棬????java.exe??javac.exe???λJava?????????????????????????????????Java JDK?????????????????????Java????????????ù???Щ????????????????????????????°?????

?????????????У????????????Щ????????????????????????????5???????
????1.javap
????javap?????Java??????????????????Java??????????????????????????????ù????????????javap?????????Hello World????????????
????public class HelloWorld{
????public static void main(String...args){
????System.out.println("Hello World!");
????}
????}
????C:UsersCycleDesktop>javap HelloWorld
????????д????κβ??????????????javap????????????????????????????????£????????Java???package??protected??public??κ??????
????Compiled from"HelloWorld.java"
????public class HelloWorld{
????public HelloWorld();
????public static void main(java.lang.String...);
????}
????C:UsersCycleDesktop>javap-c HelloWorld
??????????????-c??javap???棬????????????????????????????????????????????????????????????????JVM??
????Compiled from"HelloWorld.java"
????public class HelloWorld{
????public HelloWorld();
????Code:
????0:aload_0
????1:invokespecial#1//Method java/lang/Object."":()V
????4:return
????public static void main(java.lang.String...);
????Code:
????0:getstatic#2//Field java/lang/System.out:Ljava/io/PrintStream;
????3:ldc#3//String Hello World!
????5:invokevirtual#4//Method java/io/PrintStream.println:(Ljava/lang/String;)V
????8:return
????}
????2.jvisualvm
????jvisualvm?????Java??????????????????ù????????????ν??洰?????????????????Java??ó??????????????jvisualvm??????????????????jmp??jinfo??jstat??jstack??JConsole??????JDK 6 Update 7?????????JDK????????

??????Java??????????????????????У????????jvisualvm???????????????jvisualvm????÷?????
????3.jcmd
????jcmd???????????????????????Java JVM?У???JVM?????????jcmd?????б????jcmd?????????С???????jps????????????jconsole?????????????????????jcmd????????????????????????????id(pid)????
????C:UsersCycle>jconsole
????C:UsersCycle>jcmd JConsole help
????3344:
????The following commands are available:
????JFR.stop
????JFR.start
????JFR.dump
????JFR.check
????VM.native_memory
????VM.check_commercial_features
????VM.unlock_commercial_features
????ManagementAgent.stop
????ManagementAgent.start_local
????ManagementAgent.start
????Thread.print
????GC.class_stats
????GC.class_histogram
????GC.heap_dump
????GC.run_finalization
????GC.run
????VM.uptime
????VM.flags
????VM.system_properties
????VM.command_line
????VM.version
????help
????C:UsersCycle>jcmd JConsole VM.uptime
????3344:289.977 s
????VM.uptime?????Java??ó?????????????
??????????????????????????????????????????????
????jcmd<pid>Thread.print-l
????4.jhat
????jhat???????Java heap analysis tool?????????????????????????????jhat??????????????????????jhat??????洢??heap dump??????????webserver????????????????????2????jhat?????????????oql?????Щ??????????OQL??????????
????http://localhost:7000/oql/
????http://localhost:7000/oqlhelp/