1.JDK, JRE, JVM Three of the difference?
01.JDK: (Java development Toolkit) Java SDK is the core of the entire Java, including the Java Runtime Environment, the JRE, some Java tools and Java-based class libraries (Java program interface, that is, some class files).
J2SE: Standard Edition (edition)
Java EE: Enterprise Edition (Enterprises Edition)
J2ME: Mobile device (Micro edition)
02.JRE: (Java runtime envirnment) Java Runtime Environment, which is the Java platform. All Java programs must be run in the JRE environment.
03.JVM: (Java virtial mechinal) Java Virtual Machine, part of the JRE
Main work: An OS system call that interprets bytecode files and maps to instructions inherited by the local CPU
Java is a cross-platform, JVM-based mapping rule that uses the JVM to become OS-independent
The JVM does not care about. java files, only the. class file. Because the. class file has the instruction set required by the JVM.
2. Configuration of environment variables
01. Configure the environment variables to find the installation location of the JDK
02. Right-click My Computer, Properties---> Advanced system settings----> Environment Variables----> System environment Variables---->path
03. Place the JDK path to the bin directory, at the front of the path
04.window+r Open cmd Command window
05. Enter Java and javac carriage return if there is no prompt for error the table name environment variable is configured successfully
3. Developing Java programs using Notepad
01. Write a text file (Java source file) ending in. java
02. Writing Java Code
Example: public class helloworld{
public static void Main (string[] args) {
System.out.println ("Hello World");
}
}
03.window+r cmd
04. Find the location of the source file
05.java file name. Java (compiling Java source files)
06.java file name (run Java code, get results)
Getting Started with Java