Java environment variable configuration issues

Source: Internet
Author: User

You want to configure three environment variables
Java_home
CLASSPATH
Path
Have you configured it?

System variables → new java_home variable.
Variable value fill in the JDK installation directory (I am E:\Java\jdk1.7.0)

System variables → find Path variable → edit
Enter%java_home%\bin;%java_home%\jre\bin at the end of the variable value;
(Note that the original path of the variable value at the end of there is no; number, if not, first enter; number and then enter the above code)

System variables → new CLASSPATH variable
Variable values are filled in.; %java_home%\lib;%java_home%\lib\tools.jar (Note that there is a point in the front)

System Variable Configuration complete

Verify that the configuration is running successfully cmd input java-version (there are spaces between Java and-version)

Microsoft Windows [version 6.1.7601]
Copyright (c) Microsoft Corporation. All rights reserved.

C:\users\administrator>java-version
Java Version "1.8.0_65"
Java (TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot (TM) 64-bit Server VM (build 25.65-b01, Mixed mode)

C:\users\administrator>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
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 >
Warning: This feature is obsolete and will be
Removed in future releases.
The specified version is required to run
-showversion output product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: This feature is obsolete and will be
Removed in future releases.
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>[=< option;]
Load the native agent library <libname>, for example-agentlib:hprof
See also-agentlib:jdwp=help and-agentlib:hprof=help
-agentpath:<pathname>[=< option;]
Load the native agent library by full path name
-javaagent:<jarpath>[=< option;]
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/documentatio
L

C:\users\administrator>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
Ride
-processorpath < paths > specifying where to find comment handlers
-parameters generating metadata for reflection of method parameters
-D < directories > specify where to place the generated class files
-S < directory > specify where to place the generated source files
-H < directory > specify where to place the generated native header file
-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
-profile < profile > Make sure that the API used is available in the specified configuration file
-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\administrator>

Java environment variable configuration issues

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.