Building Java package (javac to all files)

后端 未结 3 2130
温柔的废话
温柔的废话 2021-02-07 14:10

How to compile all files in directory to *.class files?

3条回答
  •  灰色年华
    2021-02-07 14:31

    Well, this seems pretty obvious, so I may be missing something

    javac *.java
    

    (With appropriate library references etc.)

    Or perhaps:

    javac -d bin *.java
    

    to javac create the right directory structure for the output.

    Were you looking for something more sophisticated? If so, could you give more details (and also which platform you're on)?

提交回复
热议问题