The first day of Java learning

Source: Internet
Author: User

Basic Computer knowledge

Computer hardware (computer hardware)

Usually includes CPU, motherboard, memory, power supply, Host box, hard disk, video card, keyboard mouse, monitor

Computer software (computer software)

System software (operating system), application software

Software development

Software: A collection of computer data and instructions organized in a specific order

Development: The production process of software division

Software development: Software made with development tools and computer language

Computer language

Language: Human Communication

Computer language: A special language for communication of information between man and computer, as well as characters, symbols, etc. in computer language, such as: c,c++,c#,JAVA , etc.

Interactive

Interactive: graphical interface and command line mode (requires console and remembers some instructions)

Shortcut keys

CTRL + A Select all

CTRL + C copy

Ctrl + V Paste

Ctrl+x Cut

CTRL + Z Undo

Ctrl+s Save

Common DOS commands: (Win7 can shift screen right-click here to open Command window or windows+r input cmd or search program cmd)

Drive letter Toggle D:

List files and folders in the current directory dir

Create Folder MD

Remove an empty folder Rd

Go to the instruction directory CD back level directory CD:

Delete File Del

Remove a bunch of same suffix names del *.txt

Clear Screen CLS

Exit exit

Bring up Notepad Notepad

Delete Non-empty folder rd/s AAAA (ask) rd/s/q aaaa (not asked)

Java language Overview

History of the Java language

Java's father James Goslin Oak, later renamed Java

JAva Development Kit

Java 2 SDK (mostly 1.5 or 1.6 versions)

Java language Platform version

J2SE Standard Edition: Basic

• Is a solution for developing common desktop and business applications • The technology system is the foundation of the other two and can be used to develop some desktop applications

J2ME Mini Version: Android direction

• Is a solution for the development of consumer products and embedded devices

Java EE Enterprise Edition: PC browser direction

• is a suite of solutions for developing applications in enterprise environments • Technologies included in the technology, such as Servlets, JSPs, etc., are intended for Web application development Java language Features Open source, cross-platform,simplicity, object-oriented, distributed processing, robustness, structural neutrality, interpretive, high performance, multi-threading, dynamic, security The Java language Cross-platform (portability) principle(Applications written in the Java language can be run on different system platforms):Install a Java VM ( Jvm:javavirtual machine) on the operating system running the program, and the JVM is responsible for running the Java program in the system, as the JVM translates. JRE and JDK:JRE (Java Runtime Environment Java Run environment): Includes core class libraries required for Java virtual machines and Java programsJDK (Java Development Kit Java Development Kit):

The JDK is available to Java developers, which includes Java development tools and the JRE. So with the JDK installed, you don't have to install the JRE separately.

Development tools: Compilation Tools (Javac.exe) packaging Tools (Jar.exe), etc.

In simple terms: Java programs developed using the JDK are delivered to the JRE to run. The JVM guarantees cross-platform. (JDK includes JRE and JVM)

Download and install the JDK

Not described here

HelloWorld case

Introduction to Development tools: Notepad,notepad++,eclipse,myeclipse

First Program:

Create a new Helloworld.java file, enter the following code, specify the path input in DOS javac Helloworld.java to compile, the path will generate Helloworld.class file, and then enter Java HelloWorld generates code results

The extension cannot be hidden, or an error will occur

Class Helloworld{public static void Main (string[] args) {System.out.println ("Hello ZhuZhu");}}

If the environment variable is not configured, it can only be compiled in the bin directory, because only the bin directory has the appropriate execution compiler

Environment variable Configuration

Path environment variable configuration function: In order to let the source code in any location can be executed with Java instructions

Configuration Mode 1: Enter environment variable configuration, edit path to add JDK Bin directory

Configuration Mode 2: Create a new variable name Java_home, add the JDK installation directory, and then edit the PATH environment variable in the JDK directory to modify the%java_home%\bin;

CLASSPATH environment variable Configuration function: In order to allow the class file to run at any location

How to configure: Create a new variable classpath, add the directory where the class file is located

Classpath inside the configuration of the path has a sequence, now the first path to find, then the second one, in turn. Which. Represents the current Disk descriptor directory

The difference between path and classpath

The PATH environment variable is an executable file, such as an. exe file, to the executable file in the current path to find, if not found to go to the path configured in the environment variable to find the CLASSPATH environment variables are recorded in the Java class run file directory is located notepad++ Configuration

The first day of Java learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.