The command-line input parameter does not set the input in the code, but instead: Select the Java---in your Java project right-click----Run as---run configurations---Arguments----fill in the parameters (multiple parameters are separated by spaces)--run You can also enter parameters when you run the program at the command line, Java class file name "Parameter 1", "Parameter 2" ... "Parameter n" (the arguments are separated by a space)
Java command line run Java program, do two steps:
1) Javac [-D class file path] class filename. java (javac compiles. java files into a. class file)
2) Java [-D class file path] class file name (run bytecode file)
The object-oriented language regards the objective world as a class of objects composed of various objects, common characteristics and behaviors, and classes are the aggregates of properties and methods.
JDK Common components:
Javac compiler to compile Java source code into bytecode file
Java interpreter, run compiled bytecode file
Javadoc document generator, extracting documents from source programs
JDB debugger, error-checking tool
Java includes Java application and Java Applet,applet applets without the main method, which must be embedded in a hypertext file and run in the browser.
The JVM is a computer with software or hardware emulation on a single computer, and the JVM can implement a cross-platform run of Java programs.
JDK and JRE
The JRE (Java Runtime Environment) is the Java Runtime Environment, a collection of environments necessary to run Java programs, including the JVM standard implementation and the Java core class library, which does not contain development tools such as compilers, debuggers, and other tools, which are included in the JDK.
Java_home,path,classpath Environment variables:
The content of the Java_home setting is the installation directory of the JDK.
PATH sets the directory of executable files in order to run Javac and Java commands at the command line
CLASSPATH Setting the Classpath
Introduction to Java