First chapter __ Initial Java

Source: Internet
Author: User

Three development directions for 1.java: Javase (Object-oriented, API, JVM), Javame (Mobile, gaming, communication), Java EE (JSP, EJB, service)

2. Procedure for developing Java: 1. Writing the source program 2. Compiling 3. Running

3.jdk=jre+ Development Tools

Download the Java Environment JDK installation and configure environment variables,

. Install direct next step until Ancheng (remember that the installation path defaults to C:\Program Files (x86) \java\)
3. Configure Environment variables
1). Right-click Computer Properties--Advanced system settings--advanced--environment variable--system variable--path variable
2). Edit the path variable, copy and paste the bin directory under JDK's installed JDK to the PATH variable to end the semicolon. (Do not delete the previous variable)
3). Test environment variable is available, test with Java and Javac, window key +r call up run input cmd, enter Java and javac Test in command prompt (return parameter test installation succeeded)
4). Java command used to execute the compiled class file Javac command used to compile the Java file generated class file

4.IDE (intergrated Developer enviroment integrated development tool) →. MyEclipse:

Switch workspace: File--switch workspace-->other--> Select non-System disk--click OK,

5. Common errors

1). Class can not be arbitrarily named Pbulic decorated class name must be the same as the Java file

2) void is not limited.

3) Java case is different

4) statements with; End

5.JAVA Anti-compilation tool

For example, Jad can decompile a. class file to a. java file

6. Three types of annotations:

1) Single-line comment//

2) Multiline Comment/* */Shortcut: ctrl+shift+/shortcut key for uncomment: ctrl+shift+\

3) Document COMMENTS/* * * */

7. Adjustment JDK1.6 to 1.7:

1. Click on Properties in the projectto find the Java complier JDK Compliance below √ Cancel right selection 1.7.

2. Find javabuildpath in the Properties again

Remove removal JDK1.6

then click JRE System Library

then the C:\Program Files (x86) \java\jdk1.7.0_80

Paste to finish on the JRE home .

First chapter __ Initial 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.