# Java # windows install java java environment configuration

Install the JDK

First, download the official website to download into the jdk jdk,  jdk-8u231-Windows-x64

https://download.oracle.com/otn/java/jdk/8u231-b11/5b13a193868b4bf28bcb45c792fce896/jdk-8u231-windows-x64.exe?AuthParam=1575868967_a87e3bbef66305f2977b2dbf9aab1a1a

As of 20,191,209, the latest JAVA version JAVE SE 13 . Consider some compatibility problems, we recommend using JAVE SE 8 version

After the download is complete, you can install a key

After the installation there will be two JRE, a jdk internal and external jdk

A file outside of the JDK jre, jre file within a JDK, which is called the private and public JRE JRE

  • Private JRE 
    installation JDK, install a private JRE, and you can choose to install a public copy. Special tools are required in order to run JRE included in the JDK. No special JRE registry settings, and only completely contained in the JDK known Java directory location (usually in C: \ Program Files \ Java \ jdk1.8.0_231 \ jre) in.

  • Public JRE 
    by other Java applications, and is included in the JDK external (usually located in C: \ Program Files \ Java \ jre1.8.0_231). Public JRE will be registered in the Windows Registry (located at HKEY_LOCAL_MACHINE \ SOFTWARE \ JavaSoft) in. Public JRE can use the "Add / Remove Programs" to delete, and will be registered to the browser.

After installation is complete, open cmd, java or java -version input to confirm that the installation normally

C:\Users\arvin.chen>java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32          use a 32-bit data model if available
    -d64          use a 64-bit data model if available
    -server       to select the "server" VM
                  The default VM is server.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
C:\Users\arvin.chen>java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

 

Configuration environment variable

Part of the program requires the environment variable JAVA_HOME with the classpath, it is recommended after installation configuration.

JAVA_HOME: C: \ Program Files \ Java \ jdk1.8.0_231 (java installation directory)

 

classpath:.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar

Then a new variable name: classpath variable values:;.% JAVA_HOME% \ lib;% JAVA_HOME% \ lib \ tools.jar point determination

Variables found in the variable named "Path" and double-click, add% JAVA_HOME% \ bin

 

 

Published 170 original articles · won praise 207 · Views 4.59 million +

Guess you like

Origin blog.csdn.net/xiaoting451292510/article/details/103456268