Home >Java >javaTutorial >How to program in java
Each programming language has its own development tools, the latest and most complete ones provided by the official. Use Baidu to search for jdk and go to Oracle's official website to download it.
Just take a look: JDK, the abbreviation of Java Development Kit, means Java development kit.
Find the download page on the official website and download Java SE (standard version). The current highest version is Java9, and the popular version is Java8. We download Java8.
Related recommendations: "java Development Tutorial"
In the new page, accept the license agreement (you won’t be able to accept it), and download the version that matches your operating system.
# After downloading, find the installation file (the icon is a cup of hot coffee), double-click to open it, and click "Next" to complete the installation.
#It cannot be used after installation. You must configure "environment variables" first.
Right-click the "Computer" icon - click Advanced System Settings - click System Properties "Environment Variables" - Environment Variables "System Variables" - Find the "path" variable - Click "Edit" - —Add "C:\Program Files\Java\jdk1.8.0_151\bin" after the final semicolon (;).
Open the "Command Prompt" in the "Start" menu "Accessories" of the system, enter the "javac" command, and a string of Usage help text, indicating that your Java development tools can be used.
At this time, you can open the "Notepad" that comes with the system, write a HelloWorld applet, and then find a place to save it. Note that the file name and class name must be the same. , must be followed by the suffix ".java".
After saving, open the "Command Prompt" and enter the folder where the program is saved.
Use the javac command to compile the JAVA file.
Use java command to interpret CLASS files.
The above is the detailed content of How to program in java. For more information, please follow other related articles on the PHP Chinese website!