A section of Java trial Lectures, the following notes are organized.
Java Latest version Download http://www.oracle.com/technetwork/java/javase/downloads/index.html
1. What is Java?
1.java Object-oriented programming language.
2.java Object-oriented programming language role?
Write the software.
Classification of 3.java
1. Degree of depth
Primary part of 1.java----(syntax definition/Common Program Class library use)
Advanced section of 2.java----(use of special class libraries)
2. Use the Platform "field [industry]"
1.java SE [Java Standard Edition]-----desktop application
2.java EE [Enterprise Edition Java]-----Web application "Web site"
3.java ME [Mini version of Java]-----mobile device "embedded"
The relationship of 4.JAVA3 big platform
1.java SE is the foundation for developing Java EE or Java me.
5. History of development
1.1995 May 23, Sun Microsystems company launched the cross-platform programming language ――java language was born (Oak language renamed).
2.1999 years in June, Sun released three versions of Java: Standard Edition (J2SE), mini-version (J2ME), and Enterprise Edition (Java EE).
3.2005 years in June, the JavaOne conference was held, Sun Company Open Java SE 6. At this point, various versions of Java have been renamed and the number "2" has been canceled: the name of the Java ee,j2se renamed to Java Se,j2me renamed Java ME. Oracle (Oracle) announced the acquisition of Sun on April 20, 4.2009.
Features of the 6.java object-oriented programming language
1. Object-oriented programming ideas
2. Cross-platform "operating system"
3. Multithreading mechanism
4. Exception handling mechanism
5. Automatic garbage collection mechanism
*****************************************************
7. About the development and operation of Java programs
development tools for 1.java programs
JDK---java Development kit
1.java development tools and application interfaces
2.JRE---Java Runtime environment
The JRE is included in the JDK, and the JDK can either develop Java programs or run Java programs.
JRE---Java Runtime environment
Core Library of 1.java
2.JVM---java Virtual machine
The JRE is responsible for running the Java program, and the Java program can run because it has a JVM inside it.
2. Download the JDK
1. Download the website
Http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Baidu Download
"Jdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008.exe"
3. Installing the JDK
Note: Select the installation path, do not install on the C drive
4. Configure Environment Variables
Computer---Right-----properties---Advanced system settings---advanced---environment variables----system variables
1. Direct configuration:
1. Configure path
Variable name: Path
Variable value: "Bin" file under the JDK's installation path for example: E:\JDK6.0\bin; "Front"
2. Configure Classpath
Variable name: CLASSPATH
Variable value:.; E:\JDK6.0\lib\dt.jar; E:\JDK6.0\lib\tools.jar; "Start with".; " 】
2.java_home configuration------[Common]
1.java_home Configuration
Variable name: java_home
Variable Value: JDK installation path for example: D:\jdk1.6.0_30
2. Configure path
Variable name: Path
Variable value:%java_home%\bin;
3. Configure Classpath
Variable name: CLASSPATH
Variable value:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; "Start with".; " 】
5. Configuration of setting environment variables
Start---cmd---command prompt---
C:\users\administrator>java-version
If prompted
Java Version "1.6.0_10-rc2"
Java (TM) SE Runtime Environment (build 1.6.0_10-rc2-b32)
Java HotSpot (TM) Client VMs (build 11.0-b15, mixed mode, sharing)
Indicate success;
If you are prompted for "not internal command," it indicates a configuration error.
6. Developing Java programs to run Java programs
1. Writing Java source programs
1. Create a Notepad file under the specified path.
For example: Create a new Notepad file under the "F:\20150919\20150919java" path
2. Open the new Notepad file and write the Java code.
public class hello{
public static void Main (String args[]) {
System.out.println ("Welcome to learn Java language");
}
}
3. Save (Ctrl+s) to close this Notepad file.
4. Modify the name of this Notepad file
The file name---the word that follows class in the source program.
The extension---changed to ". Java"
Files that end with ". Java" are the source files for Java.
2. Compiling Java source program
1. Start--cmd--command Prompt line
2. Switch the access path to the path where the Java source files are located c:\users\administrator>f:
F:\>CD 20150919
F:\20150919>CD 20150919java
F:\20150919\20150919java>
3. Enter the compile command javac Java source file name
Example: Javac Hello.java
The successful compilation will get a class file corresponding to the path where the source file is located.
The file that ends with ". Class" is the compiled bytecode file for the Java source file.
3. Running Java programs
Enter the name of the Java bytecode file "no extension"
For example: Java Hello
8.java Program Execution Process
1. Compile the well-written Java source (". Java") through the Java compiler "Javac" to the corresponding bytecode file "". Class ""
2. Give the compiled bytecode "". Class "" File to the JVM to run--"Java".
The JVM executes the Java program and executes only the compiled bytecode file.
**********************************************************************************************
The history, development and operation of the initial knowledge Java--java program