OpenJDK 8 java and javac command help

environment

java -help

$ java -help
how to use: java [-options] class [args...]
           (When executing a class)
Or java[-options] -jar jarfile [args...]
           (When executing a jar file)
The options include:
    -d32 Use 32-bit data model if available
    -d64 Use 64-bit data model if available
    -server	  "server"When selecting a VM
The default VM is server,
This is because it is running on a server class machine.


    -cp <Directory and zip/Class search path for jar files>
    -classpath <Directory and zip/Class search path for jar files>
Directory to search for class files,
JAR archive and ZIP archive:The list is separated by.
    -D<name>=<value>
Set system properties
    -verbose:[class|gc|jni]
Perform detailed output
    -version Output the product version and exit
    -version:<value>
warning:This feature is deprecated and will be released in detail
It will be abolished.
Make the specified version mandatory for execution
    -showversion Output product version and continue
    -jre-restrict-search | -no-jre-restrict-search
warning:This feature is deprecated and will be released in detail
It will be abolished.
Include user's private JRE in version search/exclude
    -? -help Print this help message
    -Print help on X non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
Enable assertions at the specified particle size
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
Disable assertions at the specified particle size
    -esa | -enablesystemassertions
Enable system assertions
    -dsa | -disablesystemassertions
Disable system assertions
    -agentlib:<libname>[=<options>]
Native agent library<libname>To load. Example: -agentlib:hprof
                  -agentlib:jdwp=with help-agentlib:hprof=See also help
    -agentpath:<pathname>[=<options>]
Load the native agent library with the full pathname
    -javaagent:<jarpath>[=<options>]
Load the Java programming language agent. java.lang.See instrument
    -splash:<imagepath>
Display the splash screen with the specified image
For more information http://www.oracle.com/technetwork/java/javase/documentation/index.See html.

javac -help

$ javac -help
how to use: javac <options> <source files>
The available options are:
  -g Generate all debug information
  -g:none Do not generate debug information
  -g:{lines,vars,source}Generate only some debug information
  -nowarn do not raise a warning
  -Print a message about the behavior of the verbose compiler
  -deprecation Prints the location of sources where deprecated APIs are used
  -classpath <path>Specifies where to search user class files and annotation processors
  -cp <path>Specifies where to search user class files and annotation processors
  -sourcepath <path>Specifies where to search the input source file
  -bootclasspath <path>Override bootstrap classpath location
  -extdirs <dirs>Override the location of installed extensions
  -endorseddirs <dirs>Override recommended standard path location
  -proc:{none,only}Controls whether annotation processing or compilation is performed.
  -processor <class1>[,<class2>,<class3>...]The name of the annotation processor to run. Bypass the default detection process
  -processorpath <path>Specifies where to search the annotation processor
  -Generates metadata for reflection in the parameters method parameter
  -d <directory>Specifies where to store the generated class files
  -s <directory>Specifies where to store the generated source files
  -h <directory>Specifies where to store the generated native header files
  -implicit:{none,class}Specifies whether to generate class files for implicitly referenced files
  -encoding <encoding>Specifies the character encoding used by the source file
  -source <release>Maintain source compatibility with the specified release
  -target <release>Generate class files for a particular VM version
  -profile <profile>Check if the API used is available in the specified profile
  -version Version information
  -help Print a summary of standard options
  -Akey[=value]Options passed to the annotation processor
  -X Print a summary of non-standard options
  -J<flag>                   <flag>Pass directly to the execution system
  -Quit compilation if Werror warning occurs
  @<filename>Read from file options and filename

Reference material

-Java Platform Standard Edition 8 documentation -JDK development tools

Recommended Posts

OpenJDK 8 java and javac command help
javac, jar, java command cheat sheet
A look at Jenkins, OpenJDK 8 and Java 11
Java and JavaScript
XXE and Java
Compile and run Java on the command line
Getters and setters (Java)
[Java] Thread and Runnable
java jar classpath command
Java true and false
[Java] String comparison and && and ||
Java --Serialization and Deserialization
[Java] Arguments and parameters
timedatectl and Java TimeZone
[Java] Branch and repeat
Introduction to java command
[Java] Variables and types
java (classes and instances)
Java Lambda Command Pattern
Introduction to javac command
[Java] Overload and override
Command to check the number and status of Java threads
Java passes at the command prompt, but javac does not
Study Java # 2 (\ mark and operator)
Java version 8 and later features
Install OpenJDK7 (JAVA) on ubuntu 14.04
[Java] Difference between == and equals
[Java] Stack area and static area
Command mechanism and management tools
[Java] Generics classes and generics methods
Java programming (variables and data)
Java encryption and decryption PDF
Java class definition and instantiation
Apache Hadoop and Java 9 (Part 1)
[Java] About String and StringBuilder
[Java] HashCode and equals overrides
☾ Java / Iterative statement and iterative control statement
Java methods and method overloads
java Generics T and? Difference
Advantages and disadvantages of Java
java (conditional branching and repetition)
About Java Packages and imports
[Java] Upload images and base64
C # and Java Overrides Story
Java abstract methods and classes
Java while and for statements
Java encapsulation and getters and setters
Comparison of processing times based on awk, shell command, and Java