Configuring Java environment variables under the WIN10 system

Source: Internet
Author: User

1. Introduction

The new computer installed is the WIN10 system, in the configuration of the Java environment variables, following the previous tutorial configuration, the cmd command window to enter the "Java" and "java-version" commands are displayed normal, but the input "javac" command when the "Javac is not an internal or external command, so find a solution on the internet and finally solve the problem. The configuration of the environment variables under the WIN10 system is described below.

2. Environment variable Configuration

(1) Enter "Win + E" shortcut key into File explorer
(2) Right click on "This Computer", click "Properties", "Advanced system Settings", "Environment variables", at this time enter the environment variable configuration interface.
(3) Java_home environment variable and CLASSPATH environment variable configuration. Configure in the System Variables column. Because my JDK path is: D:\Program files\java\jdk1.8.0_101. So here's an example of how to configure this.

The Java_home environment variables and the CLASSPATH environment variables here are new because they do not have these two items in the system variables at first, and the configuration is not different from the previous tutorial
(4) Path environment variable configuration.

path:D:\Program Files\Java\jdk1.8.0_101\bin;D:\Program Files\Java\jdk1.8.0_101\jre\bin;

This step is important, unlike the previous tutorial, where the PATH environment variable must be configured with an absolute path, not%java_home%.

3. Testing

Use the "win+r" shortcut key, enter "CMD" into the Command line window, enter "Java", "Java-version", and "Javac" to test the following.

C:\users\lee>java usage: Java [-options] class [args ...]          (execution Class) or Java [-options]-jar jarfile [args ...]                  (Execute JAR file) options include:-d32 use the 32-bit data model (if available)-D64 use the 64-bit data model (if available)-server Select the "Server" VM    The default VM is server. -CP < directory and Zip/jar file class search path >-classpath < directory and Zip/jar file class search path > with;    A delimited list of directories, JAR files, and ZIP archives used to search for class files. -d< name >=< value > Set system Properties-verbose:[class|gc|jni] enable verbose output-version output product version and                  Exit-version:< value > Warning: This feature is obsolete and will be removed in a future release. The specified version is required to run the-showversion output product version and Continue-jre-restrict-search |                  -no-jre-restrict-search Warning: This feature is obsolete and will be removed in a future release. Include/exclude user-specific JRE in version search-? -help output This Help message-X output non-standard option help-ea[:<packagename>...|:<classname>]-enableassertions[:&l T;packagename>...|:<className>] Enable assertion-da[:<packagename>...|:<classname&gt by the specified granularity;]-disableassertions[:<packag Ename>...|:<classname>] Disables assertion with the specified granularity-esa | -enablesystemassertions Enable System Assertion-DSA | -disablesystemassertions Disable system assertion-agentlib:<libname>[=< option;] Load Native Agent library <li Bname>, for example-agentlib:hprof see also-agentlib:jdwp=help and-agentlib:hprof=help-agentpath:<pathname& Gt [=<;] Load the native agent library by full pathname-javaagent:<jarpath>[=< option;] Loading the Java programming language proxy, please See java.lang.instrument-splash:<imagepath> using the specified image to display the splash screen For more information, see HTTP://WWW.ORACLE.COM/TECHN Etwork/java/javase/documentation/index.html.
  C:\users\lee>java-versionjava Version "1.8.0_101" Java (TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot (TM) 64-bit Server VM (build 25.101-b13, Mixed mode)  
C:\users\lee>javac usage: javac <options> <source files> Where possible options include:-G generates all debug information-g:no                  NE does not generate any debug information-g:{lines,vars,source} only generates some debug information-nowarn does not generate any warnings-verbose Outputs a message about what the compiler is doing-deprecation output uses the outdated API's source location-classpath < paths > Specify find User class files and comment handlers -CP < path > specifies where to find user class files and comment handlers-sourcepath < path > Specifies the location to find the input source files-bootclasspath &L t; path > Overwrite the location of the boot class file-extdirs < directory > Overwrite the location of the installed extension-endorseddirs < directory > Overwrite the location of the standard path of the signature-PR  Oc:{none,only} controls whether annotation processing and/or compilation is performed. -processor <class1>[,<class2>,<class3>] The name of the comment handler to run;                    Bypass the default search process-processorpath < paths > Specify where to find comment handlers-parameters generate metadata for reflection of method parameters-D < directory > Specify the location of the generated class file-s < directory > specify where to place the generated source files-H < directory > specify the native header to place the generated The location of the piece-implicit:{none,class}    Specifies whether to generate a class file for an implicit reference file-encoding < encode > Specify the character encoding used by the source file-source < release > provide source compatibility with the specified release-targe                  T < release > Generate class files for a specific VM version-profile < profile > Make sure that the API used is available in the specified configuration file-version Version information-help output standard options feed-a keyword [= value] The option to pass to a comment handler-X output non-standard options                    The Feed-j< tag > Direct < tag > pass to the runtime system-werror the compiler @< file name when a warning occurs > Read from File option and file name

Reference Tutorial: http://blog.csdn.net/suncold123/article/details/48392135

Configuring Java environment variables under the WIN10 system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.