Then learn! teach you to develop your first Java program

Source: Internet
Author: User

Today our goal is to develop the first Java program in life, although it may be very simple, but this small step is a big step into the IT industry! Let's take a closer look at the development process.

    • Preparatory work

1, as a quasi-program ape-owned a computer that is essential, as for the configuration, as long as not "bully" learning machine is good.

2, please create the following folder on your computer:

D:\JAVA\JDK Storing Java environments

D:\java\tool Storage of other development tools

D:\java\code Storing Java programs

D:\java\doc store Some other documents and materials

Note: The above directory is only a reference, the purpose is to let everyone develop good habits, do not arbitrarily store our information, or more things do not know where to put.

    • Installing the Java Development environment

The installation of the Java Development environment is actually installed a software, we follow the prompts can be completed smoothly, this is very simple.

1. Download the JDK software

2, installation

Double-click the JDK executable file

Then complete the installation in the next step.

3, configuring environment variables

Click on my Computer right--Properties--advanced-environment variables, and then appear the following interface:

OK, here's the environment!

    • Develop the first paragraph of the program

1, create a new text document under the D:\java\code directory, and then change the name of the file to Hello.java

2. Right-click on the Hello.java file and select Use Notepad to open

3. Write the following code in the file and save it:

4, ready to run start our program

Typing the WINDOWS+R key at the same time the following interface appears after the input cmd-OK

Enter D: And then enter

Enter CD D:\java\code and then enter

Enter Javac Hello.java and then enter (note that the letter is case consistent)

Enter Java Hello and then enter

Well, our program has finished running and printed a sentence to us in the console.

Through this period of learning to let everyone know that programming is not difficult, installation steps to accumulate a little bit better. The content of this issue is just to tell you how to write, some things why write it? Next issue we share.

Concern

Then learn! teach you to develop your first Java program

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.