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