For a novice, using the command line for code detection and operation is necessary, today:
1, use the win keyboard key +r key to enter the running interface, (or start to find run), enter cmd into the command line interface.
2. Use the CD + file folder to enter the folder where the program is located.
3, using the Javac compiler, javac+ file name < need to have a suffix, such as. Java>, if the compilation is correct does not appear, if there are errors follow the error back to modify the program.
4, use Java + file name < do not need to have a suffix, such as .java> run, view the running results.
Common errors are: environment variable configuration is incorrect, Javac compile error, check environment variable configuration <win operating system is not case-sensitive, Linux system is case-sensitive;:
The properties of the environment variable are added, and no re-additions are available.
JAVA_HOME:JDK installation path, full path, preferably copy and paste from the address bar.
Path:%java_home%bin;
Classpath:%java_home%lib;
Note: Installing the JDK is best to set the path yourself, do not use the default path, otherwise the space under the win platform will cause an unknown error.
Three ways to read Java annotations:< Comment: will not be executed just to make the program more readable >
Single-line Comment://comment content, for single-line comment Description statement, non-wrapped comment
Multiline Comment:/* Comment content ... */, used for multiple lines of comments, can wrap comments, note content will not be executed.
Java Documentation Comments:/** Comment content ... * *, please note the distinction from the previous difference. Include such annotations in the Write program, which is used when the description document is last generated.
Detailed content can go to see the Oracle official website definition, above write not detailed place in later article will add, face and I then the same "rookie", above content basically enough.
Later content only writes the question which I encountered in the study. Take it as your own note.
Java file compilation run