Introduction to Java SE & configuration of environment variables

Source: Internet
Author: User
Tags java se

Introduction to Java SE & configuration of environment variables one, three directions of Java technology

  Java technology is divided into three directions

    • Javase ( Java Platform standard edition ) is used to develop desktop applications such as clients. It is the foundation of Java EE and the core of Java technology system;
    • Java EE ( Platform, Enterprise Edition, Corporate Edition) is used for enterprise-level application development. Usually Java EE includes 13 kinds of technologies such as JSP, Servlet, JDBC, XML, etc.
    • Javame (Java Platform micro Edition, mini version) with small-scale embedded system development, mobile phone development.
Second, the characteristics of the Java language

  The Java language has the following characteristics, which are the key to the Java language still maintaining its robustness today:

    • Cross-platform: portability. "Compile once, run everywhere";
    • Explanation Execution (Java VM): After the Java language compiles, generate bytecode files (*.class files), on different platforms, the JVM will be based on the characteristics of the current platform to interpret the class file, to get the machine code to execute;
    • Object-oriented: encapsulation, inheritance, polymorphism;
    • Garbage collection Mechanism (GC): JAVAVM can automatically detect and free memory extra memory space;
    • Support Multithreading.
Iii. preparation work 1. Java Development Kit

JDK (Java Development Kit) Java Development Environment toolset

JRE (Java Runtime Environment) Java Runtime Environment (including JVM and Java Core class libraries)

Equation--

JDK = JRE + development tool set;

JRE = JVM + Core class library.

Please visit the Oracle website to download it yourself.

2. Environment variable Configuration

After you install the JDK, you need to configure the computer's environment variables for normal use.

   Java_home: Path: \jdk1.7.0.02

Path: route: \jdk1.7.0.02\bin

Detect if the environment variable is configured successfully, command-line window, type Java, Javac, java-version if prompted, prove that the environment variable is configured successfully.

Iv. developing a Java project using Eclipse as the development environment

1. Create a workspace (workspace), which will load automatically the first time you start Eclipse

2. Creating Java Projects (Java project)

Note that the above from two projects, so the naming may be different, please identify themselves.

V. Some specifications 1, Java project name naming specification
1//Test01.java2 PackageCH01;//declaring Packages3 4 Public classTest01 {//the class name and file name must be the same5//Java Portal (the program must run with the Main method6 Public Static voidMain (string[] args) {7 System.out.print ("Hello World");//Output statement: Output8 System.out.println ("Hello World");//Output statement: Output and line wrapping9      }10}

    • Cannot use Chinese, Java keyword should not be used
    • Cannot use special characters other than "_" "$":*& () and so on are not legal
    • Can contain numbers, but cannot start with a number such as: NAME0, can not 0name
    • A single word starts with a lowercase letter
    • The Hump method is named, for example: Buttonandroidtext

Introduction to Java SE & configuration of environment variables

Related Article

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.