mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
26 lines
582 B
Plaintext
26 lines
582 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# javac
|
|
|
|
> Java application compiler.
|
|
> More information: <https://docs.oracle.com/en/java/javase/25/docs/specs/man/javac.html>.
|
|
|
|
- Compile a `.java` file:
|
|
|
|
`javac {{path/to/file.java}}`
|
|
|
|
- Compile several `.java` files:
|
|
|
|
`javac {{path/to/file1.java path/to/file2.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/directory}} {{path/to/file.java}}`
|