Of course, we can always write programs in Notepad and compile and execute them using commands like Javac and Java, but when our projects are large and have hundreds of source files, this is too much work.

IDE (integrated development Environment) is all about providing us with convenience, freeing us from all this tedious work and letting us focus on writing code.

There are several benefits to using an IDE:

  • Automatic prompt. The IDE indexes Java source files, Java class libraries, and gives us hints and code completion.
  • Code review. Check grammar errors in real time and give eye-catching hints;
  • Rich plugins. IDE can install some third-party plug-ins to help us improve development efficiency;
  • Compile and debug. Provides one-click compile and run functionality, breakpoint debugging;
  • It is very convenient to manage the project.

Common IDE

1. Eclipse

Eclipse is a well-known cross-platform open source integrated development environment (IDE). It was originally used for Java language development, but now it is also used as a development tool for C++, Python, PHP and other languages through plug-ins.

Eclipse itself is just a framework platform, but with the support of many plug-ins, Eclipse has a better flexibility, so many software developers develop their own IDES using Eclipse as a framework.

2. NetBeans

NetBeans is an open source software development tool created by Sun Microsystems. NetBeans is a development framework and extensible development platform, which can be used for Java, C language/C++, PHP, HTML5 and other programs. You can extend functionality by extending plug-ins.

3. IntelliJ IDEA

IntelliJ IDEA is a commercially available Java Integrated Development Environment (IDE) tool software developed by JetBrains Software Inc. (formerly IntelliJ). Apache 2.0 open licensed community versions and commercial versions of proprietary software are available for developers to download and use as they choose.

Others such as Codenvy, Xcode, MyEclipse, Greenfoot, and others also support Java development.

Eclipse and IDEA are the two Java development tools most used, but as far as I know, the vast majority of domestic developers use IDEA for development. This tutorial series is also developed using IDEA.

Using the IDEA of

IDEA is a development tool from JetBrains, which has a family of development tools under its umbrella.

  • Appcode-swift and Objective-C IDE development tools.

  • CLion – a cross-platform C/C++ IDE development tool that supports C++11, C++14, libc++ and Boost.

  • DataGrip – a database client tool

  • Integrated development environment for Goland-Go language.

  • IntelliJ IDEA – released in 2001. A set of intelligent Java integrated development environment, special focus and emphasis on the programmer development writing efficiency.

  • PhpStorm – PHP IDE development tool.

  • PyCharm – A Python IDE development tool that incorporates the Django framework.

  • Rider – a fast, powerful, cross-platform. NET IDE development tools.

  • RubyMine – a powerful set of Ruby on Rails IDE development tools.

  • WebStorm – JavaScript development tool.

IDEA comes in two versions, Community and Ultimate. The Community version is free and completely OK for development learning. If you are still a student, you can register and use the flagship version for free by using the Education email. For details, please refer to the official website.

IDEA can be downloaded from the official website for free.

After downloading, follow the wizard instructions to complete the installation step by step.

Build the first project

Open IDEA, click New Project, and a page of New Project will pop up. We select Java Project.

Select a path for storing the project and fill in the project name.

The following figure shows the interface opened after the project is created. In the figure, area 1 is the directory structure of the project, and area 2 is some tools provided by IDEA and plug-in. Clicking the corresponding label will enter the window in the bottom area. Area 3 is the display window for the source files. Area 4 is the toolbar for compiling, running, debugging, and so on.

In the SRC directory, right-click and create a new class named Demo. Idea will help you create a demo.java file in the corresponding folder.

Enter the following program in the Demo class:

public class Demo {
  public static void main(String[] args) {
    System.out.println("Hello, world!"); }}Copy the code

Click the small green arrow next to the Main method, or the small green arrow in the toolbar, and the program will run.

As shown in the figure below, you’ll see Hello, World! Output in the bottom window area. With the words.

The code for this tutorial will be put into the Github repository.

conclusion

  • Ides can provide us with great convenience for development;
  • Common ides include Eclipse, IDEA, etc.