Windows 8.1 and WINDOWS8 JDK environment variable configuration

Source: Internet
Author: User

First, install the JDK

Jdk:http://www.oracle.com/technetwork/cn/java/javase/downloads/index.html


Select the appropriate version based on the operating system



Second, open this computer-system-Properties


Third, open advanced system settings



IV. Open Environment Variables-new system variable determination

Variable name: java_home


Variable value: C:\Program files\java\jdk1.7.0_15/* This route installs the path for you jave */



V. New System Variables

Variable name: CLASSPATH


Variable value:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;




Six, double-click the system variable path, added in the last side:;%java_home%\bin;%java_home%\jre\bin


After completion, press "OK" to exit.


Win+r input cmd, enter in cmd: Java verifies that the configuration is correct.

Java


Javac


Java-version

-----------------------------------------------------------------------------------------
Microsoft Windows [version 6.3.9600]
(c) Microsoft Corporation. All rights reserved.

C:\users\xxxx>java
Usage: Java [-options] class [args ...]
(Execution Class)
or Java [-options]-jar jarfile [args ...]
(Execute JAR file)
Among the options are:
-d32 using a 32-bit data model (if available)
-d64 using a 64-bit data model (if available)
-server selecting the "Server" VM
-hotspot is a synonym for the "server" VM [obsolete]
The default VM is server.

Class search paths for-CP < directories and Zip/jar files >
Class search paths for-classpath < directories and Zip/jar files >
With Delimited directories, JAR archives
And a list of ZIP archives to search for class files.
-d<name>=<value>
Setting System Properties
-VERBOSE[:CLASS|GC|JNI]
Enable verbose output
-version output product version and exit
-version:<value>
The specified version is required to run
-showversion output product version and continue
-jre-restrict-search | -no-jre-restrict-search
Include/exclude user-specific JRE in version search
-? -help Output This Help message
-X output Help for non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
Enable assertion at the specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
Disables assertions with the specified granularity
-esa | -enablesystemassertions
Enable System assertion
-DSA | -disablesystemassertions
disabling system assertions
-agentlib:<libname>[=<options>]
Load the native agent library <libname>, for example-agentlib:hprof
See also-agentlib:jdwp=help and-agentlib:hprof=help
-agentpath:<pathname>[=<options>]
Load the native agent library by full path name
-javaagent:<jarpath>[=<options>]
Load the Java programming language proxy, see java.lang.instrument
-splash:<imagepath>
Displays the splash screen using the specified image
For more information, see Http://www.oracle.com/technetwork/java/javase/documentation
/index.html.

C:\users\xxxx>javac
Usage: Javac <options> <source files>
Among the possible options are:
-G generates all debug information
-g:none does not generate any debug information
-g:{lines,vars,source} only generates some debugging information
-nowarn does not generate any warnings
-verbose output messages about the actions that the compiler is performing
-deprecation output using outdated API source location
-classpath < paths > specifying where to find user class files and comment handlers
-CP < paths > specifying where to find user class files and comment handlers
-sourcepath < paths > Specify where to find the input source files
-bootclasspath < path > Overwrite the location of the boot class file
-extdirs < directories > overriding locations for installed extensions
-endorseddirs < directory > location of standard paths for overwriting signatures
-proc:{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
The search process is recognized
-processorpath < paths > specifying where to find comment handlers
-D < directories > specify where to place the generated class files
-S < directory > specify where to place the generated source files
-implicit:{none,class} Specifies whether to generate a class file for an implicit reference file
-encoding < encoding > specifying the character encoding used by the source file
-source < release > provides source compatibility with a specified release
-target < release > Generate a class file for a specific VM version
-version Version Information
Summary of-HELP output standard options
-a keyword [= value] The option to pass to the comment handler
-X output a feed of non-standard options
-j< tag > Direct < tag > pass to the runtime system
-werror terminating compilation When a warning occurs
@< file name > read from File option and file name


C:\users\xxxx>java-version
Java Version "1.7.0_15"
Java (TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot (TM) 64-bit Server VM (build 23.7-b01, Mixed mode)
-----------------------------------------------------------------------------------------

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.