24

*.javaJava ソース ファイル ( ) を別のディレクトリにコンパイルする方法はありますか?

私のパッケージファイル構造が次のような場合:

Mathematics ->
  Formulas ->
    src ->
      // source files containing mathematical formulas...
    bin ->
      // class files containing mathematical formulas...
  Problems ->
    src ->
      // source files containing mathematical problems...
    bin ->
      // class files containing mathematical problems...

フォルダーを整理するためにソース ファイルとクラス ファイルを分けたいのですが、現在、すべてのクラス ファイルをsrcフォルダーからフォルダーにコピーする必要がありbinます。

コマンドでクラス ファイルを別のフォルダーにコンパイルすることで、このプロセスを簡素化する方法はありますjavacか?

4

1 に答える 1