Java Development prelude, java prelude

Source: Internet
Author: User

Java Development prelude, java prelude

Java features

The main features of Java are:One compilation, run everywhere(Write Once, Run Anywhere .).

Principle: The. class bytecode file is generated after the Java source program is compiled. The. class file is interpreted and executed by the Java Virtual Machine (JVM. In different operating systems, as long as there is a corresponding Java bytecode interpreter, the. class file can be run, which is the basis of Java cross-platform. Shows the process of c and java programming and execution:

 

Java Connotation

1. It is a programming language

2. It is a set of development tools

3. It is a running environment

 

Java application platform

1. J2EE (Java 2 Platform Enterprise Edition) -- used for Enterprise-level application development

2. J2SE (Java 2 Platform Standard Edition) -- used for development of Standard applications

3. Java 2 Platform Micro Edition-used for the development of small-sized consumer electronic products or Embedded Systems

 

J2SE consists of four parts: JVM, JRE, JDK, and Java language.

 

Environment variable settings

Environment variables-variables defined in the operating system can be used by all applications on the operating system.

1. view environment variables

A. Command Prompt line: Environment Variable command -- set (environment variable name)

B. Window mode: My computer> Properties> advanced> Environment Variables

2. Set the path environment variable

Path environment variable: sets the path for the operating system to find and execute applications.

JAVA_HOME: C: \ Program Files \ Java \ jdk1.6.0 _ 14

Path: % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin

3. Set the classpath environment variable

The role of the classpath environment variable: allows the Java execution environment to find the specified java program (. class file ).

Classpath:.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar

Note: a. % JAVA_HOME % is preceded by ".;" and "." indicates the current directory. The two paths are separated.

B. The classpath path cannot contain spaces or Chinese characters.

 

JVM running process

 

 

Java decompilation Tool-- JAD and FrontEnd

 

Java Development Tools

1. notepad

Note that the file name should be *. java.

2. UltraEdit and EditPlus

Use EditPlus to edit and compile Java programs. Choose tools> Parameter Selection> Tools> User tools> Add tools> applications ". First, set the javac.exe file address.

Set the path of the java.exe file as shown in the preceding figure.

After setting, the shortcut key of the "javac" tool is Ctrl + 1 by default, and that of the "java" tool is Ctrl + 2. After editing the Java source program, use Ctrl + 1 to compile it, and then press Ctrl + 2 to run the program. As shown in:

3. integrated development environment: Eclipse, MyEclipse, and JBuilder.

When I first started using Eclipse and MyEclipse, I thought they were similar. I checked the information and found out that Eclipse is the foundation, just like the operating system. While MyEclipse is a program running on Eclipse, however, it is enhanced and provides new features.

I have used Microsoft Visual Studio 2005 before. I personally feel that VS2005 is a very powerful integrated development environment. However, after all,. NET and Java are not a family, so I still need to use Eclipse to learn Java.

 

Common JDK packages

1. java. lang -- contains some core classes of the Java language, such as String, Math, Thread, System, and Integer.

2. java. awt: contains multiple classes that constitute an Abstract Window toolset. It is used to build and manage the graphical user interface (GUI) of applications ).

3. java. applet -- contains the classes required for applet running.

4. java.net-contains the class for performing network-related operations.

5. java. io-Contains classes that provide multiple input/output functions.

6. java. util -- contains some utility classes.

 

Naming Conventions of Java

1. All letters in the package name are in lower case. For example:Xxxyyyzzz.

2. The class name and interface name should use nouns. the first letter of each word is capitalized. For example:XxxYyyZzz.

3. method name. The first word is in lower case, and the first letter of each word is in upper case. For example:XxxYyyZzz.

4. variable name. The first word is in lowercase, and the first letter of each word is in uppercase.

5. Each letter in the constant name is capitalized. For example:XXXYYYZZZ.

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.