Java Basics:
b/S: browser (browser)/server (Web server)
C/S: Client/server (DB server)
Ria:rich Internet Application
Ws:web Service (weather forecast and stock Search: communication between heterogeneous systems is based on service-oriented integration. Interoperable SOA between different languages and systems)
Platform-Independent: operating system. Compile at once, execute everywhere.
Sandbox: Sandbox, JVM.
Java version;
Jee:java Enterprise Edition Business Edition (a set of solutions under enterprise environment)
Jse:java Standard Edition (solution for desktop and business applications)
Jme:java Micro Edition Miniature version
Big Data solves the problem: storage + operation = = "Optimization."
Java Features:
1. Cross-platform: Demand Sandbox (JVM)
2. Oop:orientend Object program, OOP language.
All objects.
OOA Object-Oriented analysis
Ood Object-oriented design
Jvm:java Virtual Machine Java VM
Jre:java runtime enviroment Java Runtime Environment
Java + Core Class Library
Jdk:java Develop kit Java Development Kit
Java + Tools Software
Java operating mechanism:
1. Writing Source code Xxx.java
Javac (Java Compile)
2. Compiling source code *.java----------------------------->.class
Java
3. Operating mechanism: *.class------------------------> Program
Programs: Files that can be executed
Process: a running program.
To install the JDK:
1. Download the 64-bit version of the appropriate system (Jdk-8-windows-x64.exe) from the Oracle website
2. Run the installation
3. Select the path:
No spaces and non-Chinese are required.
D:\mywork\jdk
4. CD%{java_home}\bin (Bin directory for Java installation)
5. Java-version (test whether the installation is successful)
Configuring Environment variables
1. Computer--right--Properties--Advanced system settings--environment variables
Win under the case-insensitive delimiter; Linux under separators:
Tip: (In order to change the value of a path without changing the directory or directory name of the JDK, it causes
A false action on the value of the path variable. )
1. Create an environment variable Java_home record the directory of the JDK.
2. Get the value of Java_home dynamically in path by percent.
3. For example: java_home=d:\mywork\jdk1.8.0_20
Path =%java_home%\bin;%path%
Where:%java_home%: Dynamically gets the value of an environment variable named Java_home.
%path%: Dynamically gets the value of the PATH environment variable.
Unloading:
1. Control Panel
2. Procedures
3. Find the Software--Uninstall
JDK Directory:
1.bin binary binaries JDK contains some development tools to execute files
2.lib class library file JRE to use the code base, property settings, resource files
3.src class Library source files (after extracting src.zip)
4.include C Language header file supports native code programming with Java local interface and Java Virtual machine interface
5.db Java-developed data can be Derby, a relational database developed by Open source 100%java
Extension: Displays the file name extension of the OS (operating system)
1. In any window, press ALT to display the menu (if the menu is hidden)
2. Tools--Folder Options--there is an option to hide extensions for known file types.
If so, check the box. Deselect, click Apply to all folders, OK.
Write a Java program.
1. Write a text file.
Demo.java
Class demo{
}
2. Compiling Java source files
Javac Demo.java//demo.java Source file path
3. Running Java programs
Java Demo
Jar:java Archieve, Java archive file
Path:os the path order of the search files.
Classpath class Path
1. Setting in memory
Java Programs Search the order of Java classes.
Set classpath=d:\java;d:\;
2. Add CLASSPATH Environment variables
Classpath=%java_home%\lib\tools.jar;%java_home%\lib\dt.jar;.
The classpath path can be specified directly when the 3.java instruction executes.
JAVA-CP Demo
4. Order of class searches
1.-cp | The-classpath parameter specifies the path
2. Environment variables for the CLASSPATH system
3. Current directory
Java Infrastructure and Environment configuration