1. Installation and configuration of JDK
(1) Install the JDK directly (Java SDK with JRE included)
(2) Configuring environment variables: My Computer--right-click Property--Advanced--environment variable--system environment variable--path--edit (Configure the installation path of the JDK to the path attribute)
(3) Start command line mode: After the configuration is successful, enter "CMD" in the Run interface and enter Javac
2, the first program
1 Public class haha{2 Public Static void Main (String args[]) {3 SYSTEM.OUT.PRINTLN ("I Java"); 4 }5 }
Javac compiler: Compile the. java file into a. class file (a class file is one)
Java Runtime class file: specific as follows
Note: Common errors are as follows:
- Main () is written in Mian ()
- String is written in sting
- The file name is the class name of the public class--〉 first capitalization, hump principle
Chapter One Introduction to Java