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.
Make minor edits to the `javac` cheatsheet to make it more consistent with other cheatsheets.
- Loading branch information
1 parent
4545d02
commit 037469c
Showing
1 changed file
with
12 additions
and
12 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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
# Compile a simple source file | ||
# To compile a simple source file: | ||
javac HelloWorld.java | ||
|
||
# Compile several source files | ||
# To compile several source files: | ||
javac *.java | ||
|
||
# Specify another destination directory | ||
# To specify another destination directory: | ||
javac -d build HelloWorld.java | ||
|
||
# Use another source directory for source dependencies | ||
# To use another source directory for source dependencies: | ||
javac -sourcepath src/dependencies/java Main.java | ||
|
||
# Define where compiled dependencies should be searched | ||
# To 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 | ||
# To consider warnings as errors: | ||
javac -Werror NoWarning.java | ||
|
||
# Compile Java 7 code | ||
# To compile Java 7 code: | ||
javac -source 1.7 Java7.java | ||
|
||
# Make the compiler more verbose | ||
# To make the compiler more verbose: | ||
javac -verbose *.java | ||
|
||
# Display usage of deprecated APIs | ||
# To display usage of deprecated APIs: | ||
javac -deprecation App.java | ||
|
||
# Include debugging info in class files | ||
# To include debugging info in class files: | ||
javac -g HelloWorld.java | ||
|
||
# Display version | ||
# To display version: | ||
javac -version | ||
|
||
# Getting help | ||
# To get help: | ||
javac -help |