E: Enter the e-packing directory
CD: Go to a directory
Cd.. : Return to Parent directory
Cd\: Return to the root directory
MD: Creating a Directory
RD: Deleting a directory
Del: Delete Files
CLS: Emptying windows
Exit: Exit DOS command line
- Java architecture: Javase, Java EE, javame
- Java language Features:
Fully Object-oriented language
Cross-platform (provides an interpreted environment JVM that runs under different platforms)
A robust language (absorbs the advantages of C, C + +)
High security (automatic garbage collection, mandatory type checking, and cancellation of pointers)
- The core mechanism of Java technology:
Java Virtual Machine (JVM): Different JVM for different platforms
Garbage collection Machine (GC): Automatically enabled during program operation, no programmer can control and intervene accurately
JDK (Java Development Kits)--Java Developer toolset
JRE (Java Runtime Environment) Java Runtime Environment
Jvm
Java API (Application programming Interface)
java compiler (Javac.exe), Java Runtime Interpreter (Java.exe), Java documentation Tools (Javadoc.exe), and other tools and resources
The three main features of the JRE are:
Load code: Completed by class loader (loader);
Checksum code: By the Byte Code Checker (bytecode verifier) completed;
Execution code: completed by Runtime interpreter (runtime interpreter).
- Building a Java Development environment:
-
- Download: Oracle website download
- To configure environment variables:
- Path adds the paths to the bin directory in the JDK installation directory in the path variable to end. (PS: Try to copy and paste, do not write manually, it is easy to error)
- Classpath creates a new CLASSPATH environment variable, which is generally only entered in its value.; , which is an English point and a semicolon under the English language.
- Verify that the environment variable is configured successfully
- Open a command-line window, enter Javac, and then enter
- Then enter Java, then go to
- First Java program: HelloWorld
Open Notepad and enter the following:
Public class HelloWorld
{ publicstaticvoid main (string[] args)
{ System.out.println ("Hello,world"); System.out.println ("Hello,java"); } }
Save file name is Helloworld.java
Open DOS command line: Run->cmd (or press win+r)
Use DOS command to enter HelloWorld's Save directory
Compiling: Input Javac Helloworld.java
Run: Enter Java HelloWorld
You can see the screen output: Hello,world
Hello,java
Note: When the class is decorated with public, the file name must be consistent with the class name;
The statement ends with an English half-width semicolon;
The case of the keyword.
From the zero-learning Java (1)-Environment building, write HelloWorld with Notepad