Configuring the Java environment variable path, classpath

First, the configuration environment variable path

     1.path environment variables and java language does not matter, path environment variable is a knowledge belonging to the windows operating system, is dedicated to guiding the windows operating system.

     2.java To be able to feel free to use, you need to javac directory where the configuration environment variable path in usage: path = xxxx; D: \ programs \ separated by semicolons between Java \ jdk1.8.0_91 \ bin path , must be a semicolon ";."

           * After modify environment variables, you must first exit the DOS window, use the exit command to exit and re-open a

                - modify environment variables described below, there are two portions of the environment variable,: the part of the user variables that belong to the Administrator, the user is valid only for Administrator; the variable part of the system, valid for the whole system windows.    

Second, the configuration environment variable classpath

1. The first thing to know the role of the classpath: classpath is to guiding the class loader ClassLoader

2. the class of the classpath arranged .class files (bytecode file) is located, such that A.class class file, java A command can be executed at an arbitrary position of the DOS command window, JVM startup, and then loaded by the JVM startup class device, and then run java program

         The .class class file path (file byte code) is located D: \ wk \ course \ JavaProjects \ 02JavaSE \ day01, the classpath configured classpath = .; D: \ wk \ course \ JavaProjects \ 02JavaSE \ day01 wherein " . "indicates the current path. Thus each time java A need to perform the command, a path may be switched to the DOS directory window class file is located.

The configuration shown below:

发布了13 篇原创文章 · 获赞 0 · 访问量 626

Guess you like

Origin blog.csdn.net/CealWang/article/details/104524006