javac
Java application compiler. More information: <https://docs.oracle.com/en/java/javase/20/docs/specs/man/javac.html>.
Install
- All systems
-
curl cmd.cat/javac.sh
- Debian
-
apt-get install gcj-4.7-jdk - Ubuntu
-
apt-get install openjdk-12-jdk-headless - Arch Linux
-
pacman -S java-environment-common - Kali Linux
-
apt-get install openjdk-11-jdk-headless - Fedora
-
dnf install java-9-openjdk-devel-debug-1 - Windows (WSL2)
-
sudo apt-get updatesudo apt-get install openjdk-12-jdk-headless - Raspbian
-
apt-get install openjdk-8-jdk
Java application compiler. More information: <https://docs.oracle.com/en/java/javase/20/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 path/to/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/directory path/to/file.java
© tl;dr; authors and contributors