forked from cheat/cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c8e75a
commit 4545d02
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Compile a simple source file | ||
javac HelloWorld.java | ||
|
||
# Compile several source files | ||
javac *.java | ||
|
||
# Specify another destination directory | ||
javac -d build HelloWorld.java | ||
|
||
# Use another source directory for source dependencies | ||
javac -sourcepath src/dependencies/java Main.java | ||
|
||
# Define where compiled dependencies should be searched | ||
javac -classpath lib/commons-cli-1.4.jar:lib/log4j-1.2.12.jar HelloWorld.java | ||
|
||
# Consider warnings as errors | ||
javac -Werror NoWarning.java | ||
|
||
# Compile Java 7 code | ||
javac -source 1.7 Java7.java | ||
|
||
# Make the compiler more verbose | ||
javac -verbose *.java | ||
|
||
# Display usage of deprecated APIs | ||
javac -deprecation App.java | ||
|
||
# Include debugging info in class files | ||
javac -g HelloWorld.java | ||
|
||
# Display version | ||
javac -version | ||
|
||
# Getting help | ||
javac -help |