1: The most common dos operations:
Enter the specified Disk: drive letter: for example, "D: add the Enter key.
Create a folder: MD space file name, such as the md kkk enter key
Go to the specified file: first go to the specified disk, and then execute the CD space folder directory. For example: CD Java \ day01 enter key, so you can go to the day01 folder.
Other commands are not mentioned, and are rarely used. You can refer to the relevant materials. I will take a screenshot below to show you:
2: JDK Installation
Download a JDK:Http://www.oracle.com/technetwork/java/javase/downloads/index.html, It is strongly recommended to download from the official website. Then, just like installing a common software, the installation is basically silly and the next step is complete.
3: Environment configuration for verification (this is entirely for our convenience in the future ):
For Windows 7 or XP systems, right-click a computer or my computer, choose Properties> System Properties> advanced> environment variables. Find the following system variables and find the path, copy and paste the JDK installation path to the beginning and end with ";" and click "OK". You will be able to ignore the other options and set the permanent environment variables; let's verify it later;Search at the start buttonProgramEnterCMDCommand, InputJava-versionCommand, there will beJDKDescriptionJDKThe installation is successful. EnterJava OrJavacCommand.PEnvironment Variable set successfully:
4: Start our entry-level program Hello word
First, we chose editplus to provide a convenient editor for ourselves. We can download a green version on the Internet, so we won't talk about it. Baidu: editplus green version, after installing and registering, we will officially start ..
Create a new Java file named Hello word. Save the type Java (*. Java) and save it to D: Java \ day01. Enter the followingCode:
Public class helloworld
{
Public static void main (string [] ARGs)
{
System. Out. println ("Hello world! ");
}
}
After the code is complete, we need to compile the program. This is required for every Java program to be executed. We use the doc command line: Enter the CMD command in the search program bar of the Start button to compile the program, on the screen, you can play:Hello world !. Congratulations, you have completed your first Java program.
5. Notes
I hope every beginner will develop a good habit and make corresponding comments:
Single line comment ://
Text comment /***/
6: Have a good time !!