Getting Started with Java

Source: Internet
Author: User

1.JDK, JRE, JVM Three of the difference?

01.JDK: (Java development Toolkit) Java SDK is the core of the entire Java, including the Java Runtime Environment, the JRE, some Java tools and Java-based class libraries (Java program interface, that is, some class files).

J2SE: Standard Edition (edition)

Java EE: Enterprise Edition (Enterprises Edition)

J2ME: Mobile device (Micro edition)

02.JRE: (Java runtime envirnment) Java Runtime Environment, which is the Java platform. All Java programs must be run in the JRE environment.

03.JVM: (Java virtial mechinal) Java Virtual Machine, part of the JRE

Main work: An OS system call that interprets bytecode files and maps to instructions inherited by the local CPU

Java is a cross-platform, JVM-based mapping rule that uses the JVM to become OS-independent

The JVM does not care about. java files, only the. class file. Because the. class file has the instruction set required by the JVM.

2. Configuration of environment variables

01. Configure the environment variables to find the installation location of the JDK

02. Right-click My Computer, Properties---> Advanced system settings----> Environment Variables----> System environment Variables---->path

03. Place the JDK path to the bin directory, at the front of the path

04.window+r Open cmd Command window

05. Enter Java and javac carriage return if there is no prompt for error the table name environment variable is configured successfully

3. Developing Java programs using Notepad

01. Write a text file (Java source file) ending in. java

02. Writing Java Code

Example: public class helloworld{

public static void Main (string[] args) {

System.out.println ("Hello World");

}

}

03.window+r cmd

04. Find the location of the source file

05.java file name. Java (compiling Java source files)

06.java file name (run Java code, get results)

Getting Started with Java

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.