tldr/pages/common/javac.md

21 lines
477 B
Markdown
Raw Normal View History

2015-12-29 02:11:07 +00:00
# javac
> Java Application Compiler.
> More information: <https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html>.
2015-12-29 02:11:07 +00:00
- Compile a `.java` file:
2015-12-29 02:11:07 +00:00
`javac {{file.java}}`
- Compile several `.java` files:
`javac {{file1.java}} {{file2.java}} {{file3.java}}`
- Compile all `.java` files in current directory:
`javac {{*.java}}`
- Compile a `.java` file and place the resulting class file in a specific directory:
`javac -d {{path/to/some/directory}} {{file.java}}`