-------
Android training and Java training. We look forward to communicating with you! ----------
Three technical architectures of Java:
Javaee: JAVA Platform Enterprise Edition, which is used to develop applications in the enterprise environment, mainly for Web application development;
Javase: Java platform Standard Edition, which completes the development of desktop applications, is the basis of the other two;
Javame: Java platform Micro Edition, which develops electronic consumption products and embedded devices, such as programs in mobile phones;
1. JDK: Java Development Kit, Java Development and runtime environment, Java development tools and JRE.
2. JRE: Java Runtime Environment, Java program running environment, class library + JVM (Java Virtual Machine) required for Java running ).
3. Configure environment variables: Run tools in the Java JDK \ bin directory in any directory. The reason is that the directory where the tool is located is told to the system, when this tool is used, the system will help us find the specified directory.
Environment Variable Configuration:
1): Permanent configuration: java_home = % installation path % \ Java \ JDK
Path = % java_home % \ bin
2): Temporary configuration: Set Path = % PATH %; C: \ Program Files \ Java \ JDK \ bin
Features: by default, the system first finds the program to be executed in the current path. If not, it finds the program in the path set in path.
Classpath Configuration:
1): Permanent configuration: classpath =.; C: \; E :\
2): Set classpath =.; C: \; E :\
Note: when defining the classpath environment variables, pay attention to the situation
If the environment variable classpath is not defined, after Java starts JVM, it will find the class file to be run in the current directory;
If classpath is specified, the class file to be run is located in the specified directory.
Will it be found in the current directory? Two cases:
1): If a semicolon exists at the end of the classpath value and no running class is found in the specific path, a new class will be found in the current directory by default.
2): If the classpath value does not have a semicolon, the running class is not found in the specific path, and the current directory is not found.
Generally, the semicolon is not specified. If the class file to be run is not found in the specified directory, an error is returned, which allows you to debug the program.
4. What do javac and Java commands do?
Java is divided into two parts: Compilation and running.
Javac: responsible for compiling. When javac is executed, the Java compiler program is started. Compile the. Java file with the specified extension. Generates bytecode files that can be recognized by JVM. That is, the class file, that is, the Java running program.
Java: the part responsible for running. It will start JVM. Load the class library required for running and execute the class file.
To execute a file, there must be a starting point for execution, which is the main function.