Java is the most widely used language in the world today, and it is well-deserved No. 1. However, such a language is developed with only notepad and SDK, which is slightly more acute. In this article, I will talk about how to use eclipse development tools to develop Java applications. Tools/Raw Materials
- A fairly good computer, preferably a Windows system, is as easy to configure as the author's system. You can connect to the Internet.
Steps/methods download eclipse from the Internet. The official eclipse website is provided in the references. You can download eclipse (see references ). When we see so many versions, beginners may feel dizzy. In fact, eclipse can not only develop Java, PHP, C ++, but we only use Java, so we chose the first version, the one in the red circle.
After the download, decompress the package to a directory named eclipse installation directory. Find the eclipse installation directory and start eclipse. When starting, ask the default working environment, select a directory, and click OK.
Select "file"> "new"> "Java project ".
Enter the project name. Click next, and then click Finish. Under the project directory on the left, right-click the src directory and choose new> class. Enter the class name and click OK.
Write the file content:
Public class Dain
{
Public static void main (string Arg [])
{
System. Out. println ("is actually very simple. ");
}
} Right-click the src directory and choose "Run as"> "Java application ".
View the results. Notes
- For Step 1: Do not download the wrong version. For Step 7: You must correct the main function prototype to see if the brackets contain "string Arg []" (note that there is a pair of brackets "[]"). If this is an error, the main function cannot be found. For Step 9: Many people are used to the C ++ \ c development method. A dark dialog box pops up in the console program, and the Java console program is output in the console tab below, this is very important. Many people who are just using eclipse often cannot find the output.