Java IDE Showdown

Java IDE Showdown

This post is bound to ruffle a few feathers. I'm intentionally excluding the venerable NetBeans and Eclipse IDEs from this comparison. Though they are excellent personal choices, they are in fact aging platforms, and for platform engineers the more logical choice is VS Code and/or IntelliJ IDEA.

Introduction

Two platforms have risen to the forefront in recent years: VS Code, with its lightweight nature and vast extension marketplace, and IntelliJ IDEA, known for its deep integration and rich feature set for Java. Both platforms have made significant strides in supporting remote development, a crucial feature in our increasingly distributed world.

VS Code: Remote

Containers

The Dev Containers extension allows developers to use a Docker container as a development environment. This means you can define your environment as code, making it easier to manage and share.

SSH

The Remote - SSH extension lets developers connect to any location using SSH. This allows seamless editing and debugging, making it feel like you're working locally.

WSL

With the Remote - WSL extension, developers run a Linux distribution alongside their existing Windows installation. Remote - WSL leverages this capability for a native Linux development environment.

IntelliJ IDEA: Remote

Projector

IntelliJ IDEA can run the IDE backend on a server and show the frontend in a web browser. This makes it possible to use the IDE from any device with a modern web browser, without installing any software.

SSH

IntelliJ IDEA natively supports SSH connections. This facilitates remote development tasks without needing to toggle between the IDE and another terminal application.

Remote Run

IntelliJ IDEA offers deployment capabilities where you can automatically or manually synchronize with your remote host. It lets you remotely run, debug, and profile your applications.

Comparing Remote Features

Flexibility

Both platforms provide flexible remote development capabilities. VS Code has an edge with its different modes of remote development.

Integration

VS Code and IntelliJ IDEA are both well-integrated with their remote features.

Performance

VS Code, with its lightweight architecture, tends to be snappier, especially in containerized environments. However, IntelliJ IDEA, when used with Projector, offers impressive performance, given it's running the full IDE remotely.

Setup

While both platforms have made strides in simplifying remote development setup, VS Code, especially with Dev Containers, makes setting up consistent development environments a breeze.

Example: MAUI

I've been working on a secret project in the mobile app space. More on that in the future, but for now I'll share the VS Code Dev Container configuration I use. The biggest win I see here is how every developer automatically has the same environment, same settings, and in theory, same outcomes. I've created a repository containing the configuration, but the two files that matter are listed below.

.NET MAUI Dev Container

.NET MAUI Dockerfile

Conclusion

Choosing between VS Code and IntelliJ IDEA for remote Java development boils down to personal preferences and project needs. If you value a lightweight, flexible environment with quick setup, VS Code might be the way to go. On the other hand, if deep integration, a vast array of built-in features, and a robust development environment are your priorities, IntelliJ IDEA shines.

Regardless of the choice, it's evident that the future of Java development is bright, with modern platforms pushing the envelope, making remote development easier and more efficient.

Code well, and shape the future.

Resources