IDE

Integrated development environment (IDE) #

An IDE is a text editor with additional functionalities for programmers.

Classical functionalities of an IDE include:

  • code parsing and coloration,
  • code completion,
  • type checking (for typed languages),
  • navigation to variable/method/class/interface declaration,
  • navigation to variable/method/class/interface usage,
  • refactoring (e.g. renaming a variable/method/class/interface in a whole project),
  • diagnostics (e.g. in case of a parsing or typing error),
  • a debugger,
  • integration with built automation tools (e.g. Maven and Gradle for Java).

For this course, you can use any IDE (or enhanced text editor) for Java with the features above. In this section, we give a brief overview of the most popular options.

Visual Studio Code (VSCode) #

Warning. VSCode and Visual Studio are two independent programs, and serve different purposes. In particular, Visual Studio does not natively support Java anymore (although this may technically be achieved with an LSP server and a DAP debugger, as explained below).

VSCode is a (mostly) open-source project, primarily developed by Microsoft. Precisely, Code-OSS is a (fully) open source editor, and VSCode is a distribution of Code-OSS with additional features.

VSCode is a general-purpose code editor, initially designed with a focus on web development (Node.js/Javascript). VSCode has probably become the most popular code editor among developers. For instance, it is used by 74% of respondents of the 2023 StackOverflow developer survey.

Note. VSCode is often categorized as a “code editor” rather than an IDE. For this course, VSCode (together with some plugins) can serve as a Java IDE, so we will refer to it as an IDE for simplicity.

Extensibility #

The success of VSCode is often explained by its rich repository of (community-developed) plugins. At least two factors played a role:

Web development stack #

VSCode is based on Electron, which allows writing plugins in Javascript, taking advantage of a vast ecosystem of code written for web applications (notably for graphical components).

LSP and DAP #

VSCode developers introduced standardized protocols for some IDE functionalities (like the ones listed above): the Language Server Protocol (LSP) and the Debug Adapter Protocol (DAP). These protocols specify (programming language independent) interfaces for communication between a code editor and a so-called “language server” (for LSP) or a debugger (for DAP).

This led to the development of LSP servers and DAP debuggers (or more often interfaces for existing debuggers) for a variety of programming languages (a list of LSP servers and features they implement can be found here).

An additional benefit is that other editors (notably neovim, Emacs and Visual Studio) have developed support LSP servers and DAP debuggers.

for Java #

VSCode can be used as a Java IDE (at least to some extent) thanks to some plugins. For this course, you may use the extension pack for Java. If you choose the board game as your project, you may also need a plugin for Gradle, such as this one.

In some cases, using VSCode may require a little bit more configuration than a Java-centric IDE.

Eclipse, Netbeans and Intellij IDEA #

These three editors have similar functionalities, and any of these three can be used for this course. All three were designed with Java in mind, and thus offer advanced integration with a variety of Java frameworks. Each of them also supports other programming languages, but the list varies from one editor to the other.

As of today, Intellij IDEA (IntelliJ for short) is probably the most popular Java-centric editor. This is a closed-source project, thus offering more limited customization than the other two.

Eclipse is an open-source project with a large ecosystem. It is known for its community support and its advanced plugin system, which led to the development of multiple extensions over the years (including support for C/C++, Python, etc.). Note that for performance reasons, Eclipse comes with its own Java Virtual Machine (JVM), which in some (rare) cases may not behave like other JVMs.

Netbeans is also an open-source project. Notably, Netbeans provides a graphical tool to design Graphical User Interfaces (GUIs) for the Java Swing framework. However, we do not recommended using it for an advanced GUI (multiple windows, etc.), because the generated code can be very difficult to maintain or debug.