rt

解决方案 »

  1.   

    用ant :P,或自己些bat,就象Makefile一样:)
      

  2.   

    ant 里面的depends就好像是支持该功能的.
      

  3.   

    哦,你看看tomcat下的startup.bat
    虽然是启动tomcat的脚本,但是可以学习一下:P例子:compile.batif ""%1"" == ""-a"" goto compileA
    if ""%1"" == ""-b"" goto compileB
    if ""%1"" == ""-r"" goto doRunrem 编译文件名里有a
    :compileA
    shift
    javac *a*.java
    goto endrem 编译文件名里有b
    :compileB
    shift
    javac *b*.java
    goto end
    :doRun
    shift
    java %2
    :end然后
    compile -a // 就会编译当前目录下含有a的java
    compile -r Main//执行Main具体的你可以到google上搜一下windows批处理命令(要是用过DOS,批处理不会有问题的)