Properties->A" />
First set up the jdk environment.
After downloading, click Install. Then set the running environment parameters:
Right-click "My Computer"->Properties->Advanced->Environment Variables
System Variables->New->Variable Name: JAVA_HOME Variable value: D:\ProgramFiles\Java\jdk1.7.0 (This is my installation
The path is not fixed. For example, if you install to C:\ProgramFiles, fill in C:\ProgramFiles\Java\ jdk1.7.0)
System variables->Edit->Variable name: Path add: %JAVA_HOME%\bin; at the front of the variable value (if there is already a Path
item , no need to create a new one, add it directly at the end, but it needs to be separated from the previous items)
System variables->New->Variable name: CLASSPATH Variable value:
< p>.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;Finally test whether the environment variables are set successfully
< p>Click Start Menu-Run-Enter cmd here-Enter-Enter javacIf the following message appears:
Usage: javac
Among them, possible options include:
-g generates all debugging information
-g:none does not generate any debugging information
-g: {lines,vars,source} Generate only some debug information
-nowarn Generate no warnings
-verbose Print messages about what the compiler is doing
< p>-deprecation Output the source location using the deprecated API-classpath
-cp
-sourcepath
-bootclasspath
-extdirs
-endorseddirs
-d
-encoding
-source
-target
-version version information
-help Output summary of standard options
-X Output summary of non-standard options
-J
Congratulations, your Java environment variable configuration is successful!
2. If:
'javac' is not recognized as an internal or external command, an operable program
or a batch file.
It means there is an error in the Java environment variable configuration, please check it carefully!