Configure Java Bad environment
1. The purpose of the Java-related environment variable setting is:
? Set Java_home:
First, for the convenience of reference, for example, your JDK installed in the C:\Java\jdk1.6.0 directory, then set Java_home as the directory path, then you want to use this path, you need to enter%java_home%, you can avoid each reference to enter a long path string;
Second, the principle, when you are forced to change the JDK path, you only need to change the value of the java_home variable, otherwise, you will change any of the absolute path references to the JDK directory of the document, if you do not change the whole, a program can not find the JDK, the consequences are imagined----system crashes!
Third-party software will refer to the agreed java_home variable, otherwise, you will not be able to use the software, after a long time in Java will know that if a software does not work properly, you may want to think about this is not the problem.
? Set Classpath:
The purpose of this variable setting is for the program to find the corresponding ". Class" file, as an example: you compile a Java program---a.java, you will get a A.class class file, you execute Java A in the current directory, you will get the corresponding results ( The premise is that you have set the Classpath to "."). Now, you move the a.class to a different directory (for example: "E:\"), execute Java A, there will be Noclassdeffinderror exception, because the. class file is not found, now you add Classpath to: ".; E:\ "Run Java A again to see what results ~ ~ ~:) ~ ~ ~, everything is OK, java command found the. class file through Classpath!
? Set path:
The reason is simple, you want to use%java_home%\bin\java and so on at any time to execute JAVA commands, of course, you can choose to add%java_home%\bin to path path, so, We can use Java to execute commands under any path. (When you enter your code in the Command Prompt window, the operating system looks for the appropriate application in the current directory and path variable directory, and executes.)
The difference between path and classpath
? Path is configured with an executable file. exe, which can be configured to access executable files under Path paths under different drive characters
? Classpath configuration Java class file, which is the. class file
JDK installation Notes and directory interpretation
? The installation path cannot contain Chinese and cannot have spaces
? Through DOS commands, enter Java and Javac, respectively, to display some content, indicating the successful installation
? A:bin directory: This directory is used to store some executable programs.
such as Javac.exe (Java compiler), Java.exe (Java Runtime Tool), Jar.exe (Packaging tool), and *javadoc.exe (document Generation tool).
? B:DB directory: The DB directory is a small database.
? C:JRE directory: This directory is the root directory of the Java Runtime Environment, which includes Java virtual machines, runtime class packages, Java application initiators, and a bin directory, but does not include development tools in the development environment.
? D:include directory: Because the JDK is implemented through C and C + +, you need to introduce some C-language header files at startup, which is used to store these header files.
? E:lib Directory: LIB is the abbreviation for the library, meaning the Java class library or library file, which is the archive package file used by the development tool.
F:src.zip file: Src.zip is a compressed file for the SRC folder, and the source code for the JDK core class is placed in SRC, which allows you to view the source code of the Java base class.
Java language Features
1. Simplicity
2. Object-oriented
3. Distributed
4. Robustness
5. Security
6. Architecture Neutrality
7. Portability
8. Explanatory
9. High Performance
10. Multithreading
11. Dynamic Nature
Java Development Environment Configuration