01-01java Overview doc commands, jdk\jre download installation, path, classpath configuration, common minor issues in development

Source: Internet
Author: User
Tags clear screen create directory

1: Computer Overview (Learn)

(1) Computer    (2) computer hardware    (3) computer software        system software: Window,linux,mac        application software: Qq,yy, Fei Qiu    (4) software development (understanding)        Software: It consists of data and instructions. (Calculator)        Development: The software is done.        How to implement software development ?             is to use development tools and computer language to make things come    (5) Language        Natural language: The        computer language in which            people communicate with each other: C,c + + of communication between man and computer , C#,java    (6) man-machine Exchange        graphical interface: Easy        to operate DOS commands: Remember some common commands

2: Understanding and Shortcut keys of keyboard function keys

(1) function key recognition        tab        shift        Ctrl        ALT        WinDOS space up        or down        enter         prtSc    (2  ) Shortcut keys        Select all    Ctrl+A        copy    Ctrl+C        paste    Ctrl+V        cut    Ctrl +X        undo    Ctrl+Z        save    Ctrl+s

3: Common DOS commands

Open the console  windows+r  run  input cmd Enter, enter the console    (1) common following        drive symbol switch            d:        Enter the directory of the            CD Javase CD            Javase\day01\code        the fallback CD for the catalog            :            CD        Clear            CLS        exit            exit    (2) other several (understanding)                Dir (directory): Lists files in the current directory and folder        MD ( Make directory: Create directory        rd (remove directory): Delete directory, different from delete file        CD (change directory) changes the specified directory (enter the specified directory)        CD.: Go back to the top level directory        cd\: Rollback to root        del (delete): Delete file, delete a bunch of suffix files *.txt        exit: Exit DOS command line        CLS: (Clear screen) Clear

4:java Language Overview

(1) History        of the Java language Java's father                JDK1. 4.2        JDK5        JDK7    (2) Java language features        a number of small features, with a focus on two open source, cross-platform    (3) The Java language is cross-platform, how can I assure you?  (understanding)        We explain it through the case of translation.                for different operating systems, improve the different JVM to achieve.    (4) The Java language Platform        Javase        javame--Android        java EE

The role and relationship of 5:JDK,JRE,JVM

(1) function        JVM: The        development Environment of Jdk:java program    to ensure the running environment of the Java language Cross-platform Jre:java program (2) Relationship        Jdk:jre+ Tools        JRE:JVM+ class Library

6:JDK download, install, uninstall

(1) download to official website.


for different operating systems, download different JDK versions to identify the operating system of the computer A: Can also go to Baidu search can.
 B: I'll give it to you. (2) installation A: The green version of the decompression can be used B: The installation version must be step-by-step installation, generally as long as the click on the next note: It is recommended that  all development-related software should not be installed in Chinese or a blank directory.
When prompted to install the JRE, you can choose not to install.
(3) Uninstall A: Green version directly delete folder B: Install version -- Add Remove program B: Through the Professional software Uninstall tool. (e.g. 360 software Manager uninstall)

The Installed path

Detect if the installation was successful

In the cmd input Java, you can know

7: The first program: HelloWorld case

 class HelloWorld {public static  void  Span style= "COLOR: #000000" > main (string[] args) {System.out.println ( "HelloWorld" );            }} ( 1) program explains that the most basic unit of a A:java program is a class, so we define a class.        Format: Class name example: Class HelloWorld B: When writing content in a class, enclose it in curly braces.            To execute a c:java program, you must have the main method. Format: public static  void   main (string[] args) D        : To point to those things, enclose them in curly braces. E: What are you going to do ?  Today we just made a simple output format: System.out.println ( "HelloWorld" );        Note: The contents of  ""  2 

8: Common problems

(1) The extension is hidden, be sure to avoid        how to find: Tools --Folder Options--View-- Remove the check mark of the hidden extension    (2) I want the file name to match the class name.        in fact, it is possible not to do so.        However, note:            Javac followed by the filename + extension Java followed            by the class name without the extension    (3) The Java language is strictly case-sensitive, please note.         There is also the word don't write wrong.    (4) See illegal characters: \65307 is definitely a Chinese problem.        We write procedures that require punctuation marks to be all in English state.    (5) The pairing problem of brackets. In        general, the parentheses are paired up.    (6) When the main method is        not found in the class HelloWorld, define the main method as a        certain format problem for the main method. 

Operating principle

9:path Environment variables

    (1) The role of the PATH environment variable        guarantees that the Javac command can be run in any directory.        Similarly, you can configure QQ, etc.    (2) path configuration of two scenarios:        A: Scenario 1 (understanding)        B: Scenario 2            Find the location of the environment variable, in the system variable inside the            NEW:                variable name: java_home                Variable Value: D : \develop\java\jdk1. 7. 0_60            Modify:                variable name: Path                Variable value:%java_home%\bin; previous content    

The role of the PATH environment variable configuration

The execution of the program requires the use of external instruction Javac, but the javac instruction can only be in the bin directory under the JDK installation directory, so the program can only be written to the Bin directory program development process, the source code can not be written to the JDK installation directory, so you need to save the source program in any location of the specified directory ( English directory), so you need to make the JAVAC directive run in any directory

PATH environment variable configuration mode 1

By configuring the PATH environment variable, the directory in which the javac instruction resides, the bin directory under the JDK installation directory, is configured under the PATH variable to enable the javac instruction to run the WIN7,WIN8 system in any directory:

Right click on desktop computer → select Properties → select advanced system settings → select advanced tab → Click environment variables → system variables below find path→ double-click Path

Add the Bin directory under the JDK installation directory to the leftmost and add a semicolon

Test is configured successfully, run Javac in any directory of CMD

Helloworl.java can also be run on the D-Reel.

PATH environment variable configuration Mode 2-----recommended method

How to configure the PATH environment variable in reference form

Create a new variable name: Java_home to Java_home

Add Variable Value: JDK installation directory

Modify the JDK directory in the PATH environment variable%java_home%\bin;

Test can run successfully

PATH environment variable has precedence

CLASSPATH environment variable configuration mode----generally do not need to configure, a little understanding can

Role: Enables. class files in the Classpath directory to run in any directory

Create a new variable name: classpath

Value to the specified directory with the class file, using semicolons between multiple directories (;) split

Tip: You will typically add the configuration to the front of the directory. Configuration, even if the current directory, the. class file search for the current directory, and then based on the order of the directory configuration to find and run, so the configuration in the Classpath directory is in order

The difference between path and classpath

The PATH environment variable is a 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 directory environment variable to find the CLASSPATH environment variables are recorded in the Java class running file is located

01-01java Overview doc commands, jdk\jre download installation, path, classpath configuration, common minor issues in development

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.