有个jdb的工具Usage: jdb <options> <class> <arguments>where options include:
-help print out this message and exit
-version print out the build version and exit
-host <hostname> host machine of interpreter to attach to
-password <psswd> password of interpreter to attach to (from -debug)
-dbgtrace print info for debugging jdboptions forwarded to debuggee process:
-D<name>=<value> set a system property
-classpath <directories separated by ":">
list directories in which to look for classes
-X<option> non-standard debuggee VM option<class> is the name of the class to begin debugging
<arguments> are the arguments passed to the main() method of <class>For command help type 'help' at jdb prompt
-help print out this message and exit
-version print out the build version and exit
-host <hostname> host machine of interpreter to attach to
-password <psswd> password of interpreter to attach to (from -debug)
-dbgtrace print info for debugging jdboptions forwarded to debuggee process:
-D<name>=<value> set a system property
-classpath <directories separated by ":">
list directories in which to look for classes
-X<option> non-standard debuggee VM option<class> is the name of the class to begin debugging
<arguments> are the arguments passed to the main() method of <class>For command help type 'help' at jdb prompt
set path=%path%;/java home/bin
set classpath=%classpath%;.
当然你也可以把上面的命令做成批处理文件