有个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

解决方案 »

  1.   

    以上是UNIX环境底下的,WINDOWS平台上用jdb -h自己看帮助吧。
      

  2.   

    先用jdk/bin/下的javac *.java编译你的程序,然后运行java *即可(* 代表你的程序名称)
      

  3.   

    在dos环境下运行下面的命令:
    set path=%path%;/java home/bin
    set classpath=%classpath%;.
    当然你也可以把上面的命令做成批处理文件
      

  4.   

    关于这个,有一本专门的书,不单单讲如何debug,还告诉你很多道理,那就是《java程序调试实用手册》
      

  5.   

    jdb吧,用惯了挺好的,jdk里面有。