较有价值的解决办法是做一个工程的makefile.
推荐使用ant,直接执行javac task就可以了.http://ant.apache.org
不知道是不是这个意思?

解决方案 »

  1.   

    同意,用ant就可用同时编译不同目录下的文件了
     比如src/com/test.java 和baksrc/com/csdn/csdnTest.java
      

  2.   

    不会吧,用javac就不行了???
      

  3.   

    我觉得
    在java文件中直接import 要用到的class就可以阿。给出目录就可以阿
    编译也不必特殊处理
      

  4.   

    -sourcepath : Specify where to find input source filesC:\>javac
    Usage: javac <options> <source files>
    where possible options include:
      -g                        Generate all debugging info
      -g:none                   Generate no debugging info
      -g:{lines,vars,source}    Generate only some debugging info
      -nowarn                   Generate no warnings
      -verbose                  Output messages about what the compiler is doing
      -deprecation              Output source locations where deprecated APIs are us
    ed
      -classpath <path>         Specify where to find user class files
      -sourcepath <path>        Specify where to find input source files
      -bootclasspath <path>     Override location of bootstrap class files
      -extdirs <dirs>           Override location of installed extensions
      -d <directory>            Specify where to place generated class files
      -encoding <encoding>      Specify character encoding used by source files
      -source <release>         Provide source compatibility with specified release
      -target <release>         Generate class files for specific VM version
      -help                     Print a synopsis of standard options