Introduction to Java

Source: Internet
Author: User

The command-line input parameter does not set the input in the code, but instead: Select the Java---in your Java project right-click----Run as---run configurations---Arguments----fill in the parameters (multiple parameters are separated by spaces)--run You can also enter parameters when you run the program at the command line, Java class file name "Parameter 1", "Parameter 2" ... "Parameter n" (the arguments are separated by a space)

Java command line run Java program, do two steps:
1) Javac [-D class file path] class filename. java (javac compiles. java files into a. class file)
2) Java [-D class file path] class file name (run bytecode file)

The object-oriented language regards the objective world as a class of objects composed of various objects, common characteristics and behaviors, and classes are the aggregates of properties and methods.

JDK Common components:
Javac compiler to compile Java source code into bytecode file
Java interpreter, run compiled bytecode file
Javadoc document generator, extracting documents from source programs
JDB debugger, error-checking tool

Java includes Java application and Java Applet,applet applets without the main method, which must be embedded in a hypertext file and run in the browser.

The JVM is a computer with software or hardware emulation on a single computer, and the JVM can implement a cross-platform run of Java programs.

JDK and JRE
The JRE (Java Runtime Environment) is the Java Runtime Environment, a collection of environments necessary to run Java programs, including the JVM standard implementation and the Java core class library, which does not contain development tools such as compilers, debuggers, and other tools, which are included in the JDK.

Java_home,path,classpath Environment variables:
The content of the Java_home setting is the installation directory of the JDK.
PATH sets the directory of executable files in order to run Javac and Java commands at the command line
CLASSPATH Setting the Classpath

Introduction to 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.