Choosing your Java IDE

Updated: December 2018.

Every Java developer needs a programming editor or IDE that can assist with the grungier parts of writing Java and using class libraries and frameworks. Deciding which editor or IDE will best suit you depends on several things, including the nature of the projects under development, your role in the organization, the process used by the development team, and your level and skills as a programmer. Additional considerations are whether the team has standardized on tools, and your personal preferences.

The three IDEs most often chosen for server-side Java development are IntelliJ IDEA, Eclipse, and NetBeans. These aren’t the only choices, however, and this review will include some lightweight IDEs as well.

For this roundup, I did fresh installations of IntelliJ IDEA Ultimate 2018.3, Eclipse IDE 2018‑09 for Java EE Developers, and Apache NetBeans (incubating) IDE 9 on a Mac. I also checked out several open source Java projects so that I could test all of the IDEs on the same projects.

Basics: What you need from a Java IDE

At minimum, you would hope that your IDE supports Java 8 and/or 11 (the LTS versions), Scala, Groovy, Kotlin, and any other JVM languages you regularly use. You’d also want it to support the major application servers and the most popular web frameworks, including Spring MVC, JSF, Struts, GWT, Play, Grails, and Vaadin. Your IDE should be compatible with whatever build and version control systems your development team uses; examples include Apache Ant with Ivy, Maven, and Gradle, along with Git, SVN, CVS, Mercurial, and Bazaar. For extra credit, your IDE should be able to handle the client and database layers of your stack, supporting embedded JavaScript, TypeScript, HTML, SQL, JavaServer Pages, Hibernate, and the Java Persistence API.

Finally, you would hope that your Java IDE lets you edit, build, debug, and test your systems with ease and grace. Ideally, you’d not only have intelligent code completion, but refactoring and code metrics. If you’re in a shop that does test-driven development, you want support for your testing frameworks and stubbing. If your group uses a ticket system and CI/CD, it’s best if your IDE can connect to them. If you need to deploy to and debug on containers and clouds, your IDE should help you do so.

With that foundation in mind, let us consider the contenders.

IntelliJ IDEA

IntelliJ IDEA, the premier Java IDE in terms of both features and price, comes in two editions: the free Community edition, and the paid Ultimate edition, which has additional features.

The Community edition is intended for JVM and Android development. It supports Java, Kotlin, Groovy, and Scala; Android; Maven, Gradle, and SBT; and Git, SVN, Mercurial, CVS, and TFS.

The Ultimate edition, intended for web and enterprise development, supports Perforce in addition to the other version control systems; supports JavaScript and TypeScript; supports Java EE, Spring, GWT, Vaadin, Play, Grails, and other frameworks; and includes database tools and SQL support.

The idea is that the commercial (Ultimate) edition will earn its place on a professional’s desktop, justifying a paid subscription through increased programmer productivity. If you are earning $50K-$100K per year as a Java developer, it doesn’t take much of a productivity boost to give you a quick ROI on a $500/year business IDEA subscription. The price goes down in subsequent years for businesses, is much lower for startups and individuals, and is free for students, teachers, “Java champions,” and open source developers.

IntelliJ touts IDEA for deep insight into your code, developer ergonomics, built-in developer tools, and a polyglot programming experience. Let’s drill down and see what these features mean, and how they can help you.

Martin Heller

Figure 1. IntelliJ IDEA offers a wide variety of context-sensitive actions within the editor, including an extensive selection of refactoring options and integration with GitHub.

Deep insight into your code

Syntax coloring and simple code completion are a given for Java editors. IDEA goes beyond that to provide “smart completion,” meaning that it can pop up a list of the most relevant symbols applicable in the current context. These are ranked by your personal frequency of use. “Chain completion” goes deeper and displays a list of applicable symbols accessible via methods or getters in the current context. IDEA also completes static members or constants, automatically adding any needed import statements. In all code completions, IDEA tries to guess the runtime symbol type, refine its choices from that, and add class casts as needed.

Java code often contains other languages as strings. IDEA can inject fragments of SQL, XPath, HTML, CSS, and/or JavaScript code into Java String literals. For that matter, it can refactor code across multiple languages; for example, if you rename a class in a JPA statement, IDEA will update the corresponding entity class and JPA expressions.

When you’re refactoring a piece of code, one of the things you typically want to do is also refactor all the duplicates of that code. IDEA Ultimate can detect duplicates and similar fragments and apply the refactoring to them as well.

IntelliJ IDEA analyzes your code when it loads, and when you type. It offers inspections to point out possible problems and, if you wish, a list of quick fixes to the detected problem.

Developer ergonomics

IntelliJ designed IDEA with the developer’s creative flow–aka “being in the zone”–in mind. The Project tool window shown at the left in Figure 1 disappears from view with a simple mouse click, so that you can concentrate on the code editor. Everything you want to do while editing has a keyboard shortcut, including bringing up symbol definitions in a pop-up window. While learning the shortcuts does take time and practice, eventually they become second nature. Even without knowing the shortcuts, a developer can learn to use IDEA easily and quickly.

The design of the IDEA debugger is especially nice. Variable values show up right in the editor window, next to the corresponding source code. When the state of a variable changes, its highlight color changes as well.

Built-in developer tools

IntelliJ IDEA provides a unified interface for most major version control systems, including Git, SVN, Mercurial, CVS, Perforce, and TFS. You can do all your change management right in the IDE. As I tested IDEA, I wished that the last change in a source code block would show up in the editor window as an annotation (like it does in Visual Studio). As it turns out, there’s a plugin for that.

IDEA also integrates build tools, test runners, and coverage tools, as well as a built-in terminal window. IntelliJ doesn’t have its own profiler, but it supports several third-party profilers through plugins. These include YourKit, created by a former IntelliJ lead developer, and VisualVM, which is a repackaged version of the NetBeans profiler.

Debugging Java can be a pain when mysterious things happen in classes for which you have no source code. IDEA comes with a decompiler for those cases.

Java server programming often involves working with databases, so IDEA Ultimate includes SQL and NoSQL database tools. If you need more, a dedicated SQL IDE (DataGrip) is available as part of an all-products subscription that’s only a little more expensive than an IDEA Ultimate subscription.

IntelliJ IDEA supports all the major JVM application servers, and can deploy to and debug in the servers, fixing a major pain point for Enterprise Java developers. IDEA also supports Docker through a plugin that adds a Docker tool window. (Speaking of plugins, IntelliJ has a lot of them.)

Polyglot programming

IDEA has extended coding assistance for Spring, Java EE, Grails, Play, Android, GWT, Vaadin, Thymeleaf, Android, React, AngularJS, and other frameworks. Not all of these are Java frameworks. In addition to Java, IDEA understands many other languages out of the box, including Groovy, Kotlin, Scala, JavaScript, TypeScript, and SQL. If you need more, there currently are hundreds of IntelliJ language plugins, including plugins for R, Elm, Go, Rust, and D.

Eclipse IDE

Eclipse, long the most popular Java IDE, is free and open source and is written mostly in Java, although its plugin architecture allows Eclipse to be extended in other languages. Eclipse originated in 2001 as an IBM project to replace the Smalltalk-based IBM Visual Age family of IDEs with a portable Java-based IDE. A goal of the project was to eclipse Microsoft Visual Studio, hence the name.

Java’s portability helps Eclipse be cross-platform: Eclipse runs on Linux, Mac OS X, Solaris, and Windows. The Java Standard Widget Toolkit (SWT) is at least partially responsible for Eclipse’s look and feel, for good or ill. Likewise, Eclipse owes its performance (or, some say, lack thereof) to the JVM. Eclipse has a reputation for running slowly, which harks back to older hardware and older JVMs. Even today it can feel slow, however, especially when it is updating itself in the background with many plugins installed.

Part of the overhead going on in Eclipse is its built-in incremental compiler, which runs whenever it loads a file and whenever you update your code. This is on balance a very good thing, and provides error indicators as you type.

Independent of the build system, an Eclipse Java project also maintains a model of its contents, which includes information about the type hierarchy, references, and declarations of Java elements. This is also on balance a good thing, and enables several editing and navigation assistants as well as the outline view.

The current version of Eclipse is 2018‑09. I installed the Eclipse IDE for Java EE Developers, but there are many other installation packages, including the option to install the minimal Eclipse SDK and add plugins only as needed. The last option is not for the faint of heart, however: it’s not hard to introduce conflicts between plugins that didn’t actually say they were incompatible.

eclipse ide screenshot 2018 11 25 12.05 Martin Heller

Figure 2. Clockwise from the top left, we’re seeing four panes in the Eclipse workbench: the Project Explorer, the Java editor, the Java class outline, and the problems and tasks lists.

Extensible tools support

The plugin ecosystem is one of Eclipse’s strengths, as well as being a source of occasional frustration. The Eclipse marketplace contains over 1,600 solutions currently, and community-contributed plugins may or may not work as advertised. Still, Eclipse plugins include support for over 100 programming languages and almost 200 application development frameworks.

Most Java servers are also supported: if you define a new server connection from Eclipse, you’ll come to a list of vendor folders, underneath which you’ll find about 30 application servers, including nine versions of Apache Tomcat. The commercial vendors tend to lump their offerings together: for example, there is only one item under Red Hat JBoss Middleware, which includes WildFly and EAP Server Tools, as well as JBoss AS.

Editing, browsing, refactoring, and debugging

A developer’s first experience with Eclipse can be disconcerting, even confusing. This is because your first task is to adapt to Eclipse’s conceptual architecture of workspaces, perspectives, and views, the functions of which are determined by what plugins you have installed. For Java server development, for example, you are likely to use the Java, Java EE, and Java browsing perspectives; the package explorer view; the debugging perspective; a team synchronizing perspective; web tools; a database development perspective; and a database debugging perspective. In practice, all of those will start to make sense once you open the views you need.

There is often more than one way to do a given task in Eclipse. For example, you can browse code with the project explorer and/or the Java browsing perspective; which you choose is a matter of taste and experience.

Java searching support allows you to find declarations, references, and occurrences of Java packages, types, methods, and fields. You can also use Quick Access to search, and use quick views to pop up things like class outlines.




Page 2

Adding methods and generating classes are supported by error annotations and content assist. Common code patterns can be generated from code templates, and Eclipse can automatically generate and organize your import statements. Refactoring Java in Eclipse supports 23 operations, ranging from common renaming operations to more obscure transformations right out of Martin Fowler’s book. Refactoring can be performed not only interactively, but also from refactoring scripts.

Eclipse supports debugging both locally and remotely, assuming that you are using a JVM that supports remote debugging. Debugging is fairly standard: you typically set breakpoints, and then view variables in a tab of the debugging perspective. You can of course step through your code and evaluate expressions.

Eclipse has extensive help and documentation, of varying age, currency, and utility. It’s not unusual to discover that the documentation includes images that don’t match the current version of the software, or that the keystrokes for your operating system are different from the ones called out in the help. I’m afraid it’s one of the common problems with open source projects: the documentation can lag the software by months or even years. Because the ecosystem is so big, Eclipse has more than its share of documentation issues.


The NetBeans Java IDE started life as a university student project in Prague in 1996, became a commercial product in 1997, was bought by Sun in 1999, and was released to open source in 2000. It was recently donated to Apache, and has been accepted as an incubating project.

Oracle is turning over the code in chunks; the initial drop was only the Java SE portion of the code. You need to use the 8.2 libraries to get the other plugins you may be used to having. The turmoil in NetBeans land during the hand-off may explain why NetBeans 9 doesn’t yet support JUnit 5: at this point that integration is only in the outline phase.

The current version, 9.0, lacks the system-specific installers we expected in previous versions. I downloaded the binaries and unpacked them. I quickly discovered the need to install nb-java, as this version doesn’t run on Java 8. It does have good support for JDK 8, 9, and 10 code, however. Its editors, code analyzers, and converters can help you to upgrade your applications to use new Java language constructs, such as lambdas, functional operations, method references, and the var type.

netbeans ide screenshot 2018 11 25 11.49 Martin Heller

Figure 3. This is NetBeans 9 showing, clockwise from the upper left, the Projects, editor, output, and Navigator windows. The errors in the output were caused by NetBeans 9’s native lack of Maven support, and were fixed when I added the Groovy kit from the NetBeans 8.2 repository.

Editing and refactoring

The language-aware NetBeans editor detects errors while you type and assists you with documentation popups and smart code completion. It seems to do so with fewer noticeable pauses than Eclipse does, although slightly more than IntelliJ IDEA. NetBeans also offers a full range of refactoring tools to allow you to restructure code without breaking it; performs source code analysis; and offers an extensive set of hints to quickly fix or enhance your code. NetBeans includes a design tool for Swing GUIs, previously known as “Project Matisse.”

The Inspect & Transform tool enables you to run inspections across your codebase while automatically fixing your code. Personally, I always make sure I’ve checked in all my code and run all my unit tests successfully before running tools that can make sweeping changes; I’ve been burnt more than once by automatic “fixes” that cause regressions.

Building, debugging, and profiling

NetBeans has good built-in support for Maven and Ant, and a plugin for Gradle. I was pleased to discover that existing Maven projects are now treated as “native,” meaning that you simply open them rather than importing them. NetBeans also includes a sexy (and useful) graph view for Maven dependencies.

The NetBeans Java debugger is good, albeit conventional. A separate visual debugger lets you take GUI snapshots and visually explore the GUI of JavaFX and Swing applications. The NetBeans profiler is very nice for understanding both CPU and memory use, and has good tools for finding memory leaks.

Comparing the big three Java IDEs

I personally have used Eclipse, NetBeans, and IntelliJ IDEA over the years, in that chronological order. After each switch, I felt that I had improved my productivity once I got used to the new IDE. Even once I thought I had firmly switched to IntelliJ, however, there were times I had to return to one of the other Java IDEs, for example during the period when Eclipse was the only IDE supported for Android development. (Android Studio, the current official Android IDE, is based on IntelliJ IDEA.)

I have full-time Java developer friends who use and swear by each of the big three IDEs. The IntelliJ IDEA users in particular are as loyal to their IDE as Visual Studio C++ and C# coders are to theirs, and claim that their productivity gains returned the cost of their annual subscriptions within a few weeks of use. NetBeans and Eclipse users are almost as loyal to their choices, and some wonder why people pay money for IntelliJ.

I tend to recommend that new Java coders not use Eclipse. Even though it’s the most popular Java IDE, it has the steepest learning curve and the most potential for confusion, both in daily use and when maintaining the IDE. The many perspectives and views offer all sorts of functionality, but switching from one perspective to another can be jarring and disturb your flow.

Eclipse has the largest plugin ecosystem of any IDE, and also the greatest tendency to become unusable if you install an incompatible set of plugins. Sadly, I’ve had to delete my broken Eclipse installation and start over with an official distribution bundle at least half a dozen times over the years. At this point, I always start fresh when a new Eclipse “release train” comes out in June.

NetBeans is good enough for most people, and has a nice profiler. I use it in a pinch, but I still prefer IntelliJ IDEA Ultimate.

For new Java coders without a tools budget, the choice is between NetBeans and IntelliJ IDEA Community Edition. If you’re coding Java servers with little or no money to spare, then NetBeans might be the better choice, unless you fall into a category that would entitle you to a free or discounted copy of IntelliJ IDEA Ultimate–such as being a student or working on an open source project.

Lightweight Java IDEs

While most people do best developing Java with IntelliJ, NetBeans, or Eclipse, there are still cases where you might want a lightweight IDE, or even a programming editor, such as Sublime Text, emacs, or vim, with a Java plugin.

If you’re looking for a lightweight IDE to try, consider these reasonable options:

  • DrJava is a free lightweight development environment for writing Java programs. Designed for student use at Rice University, it currently has over three million downloads. DrJava is intended to foster test-driven software development. It includes an intelligent program editor, an interactions pane for evaluating program text, a source level debugger, and a unit-testing tool.
  • BlueJ is a free Java development environment designed for beginners at Kings College London. It is supported by Oracle. BlueJ has a deliberately smaller and simpler interface than professional environments like NetBeans or Eclipse, and there is an introductory college textbook about learning OOP with BlueJ.
  • JCreator is a lightweight Java IDE for Windows, written in C++ for performance reasons. The paid Pro version has a debugger, Ant support, and code wizards; the free LE version does not. JCreator does not seem to have been updated since 2015, however.
  • Eclipse Che is a browser- and cloud-based IDE and developer workspace server. Che supports Java along with C++, JavaScript, Python, PHP, Ruby, and SQL.

Project-based tips for choosing a Java IDE

I’ve described the notable features of each of the top three Java IDEs and offered a glimpse at a handful of lightweight alternatives. You’ll need to weigh this information against your personal development needs and resources to decide which IDE will suit you best. In addition to personal considerations, there are also project-based considerations. In many cases, it is easiest to use the same IDE as the rest of your development team, but that isn’t completely necessary.

For example, if a team project is hosted on GitHub, then your life will be easier if your IDE supports GitHub. That isn’t an absolute requirement, however: you can always use a GitHub client or git command-line and switch back and forth to your IDE. On the other hand, you really do want your IDE to support whatever build system has been adopted by the team. If it’s Maven, for example, you don’t want to have to reinvent the build system in Ant for your local testing. Fortunately, the big three Java IDEs all support Ant, Maven, and Gradle, either out of the box or with a plugin. That isn’t necessarily the case with the lightweight IDEs.

You are going to want to your IDE to support the JRE version that is standard for the project; if there’s a version mismatch, you will run into bugs that the rest of the team can’t reproduce. That’s not a situation you want to create. Fortunately, JRE mismatches are more often configuration errors than errors caused by lack of support in the IDE: the exceptional case happens briefly when an IDE hasn’t yet released an update for a new Java version.

It helps a great deal if your IDE has strong support for the frameworks and technologies used in your project. You can get by without that, but if, for example, the IDE knows how JPA statements relate to entity classes and JPA expressions (as IntelliJ does), then you are likely to spend less time on your JPA-related code. And if the IDE supports the testing framework and test runner used by the project, you’ll be able to test without leaving your workspace.

You’ll also want your IDE to support deploying your Java apps to containers, specifically Docker containers with the option to work with Kubernetes orchestration. Direct support for the public clouds you use will make your life much simpler. And if your IDE can support JVM-based frameworks for machine learning and deep learning, such as Spark.ML and, that’s a definite plus.

Finally, it helps if your IDE can connect with whatever ticketing and bug tracking system has been adopted for the project. Again, you can get by using a standalone or web client for, say, JIRA, but you’ll be more productive if you can check out your tickets directly from your IDE.


I’ve made a strong case for IntelliJ IDEA Ultimate, which many would consider the Cadillac of modern Java IDEs. While it’s not free like Eclipse or NetBeans, I believe the productivity gain is worth the annual subscription. For developers just starting out, or those preferring not to pay, I recommend NetBeans over Eclipse. Whereas Eclipse’s plugin ecosystem once made it the top choice for developers, today it has become unwieldy and somewhat poorly maintained.

I also touched on lightweight alternatives, including two designed for student use. These are worth experimenting with, and could be your best option if you are just learning Java, if you find the full-featured IDEs overwhelming, or you just like a lighter weight development environment.

This story, “Choosing your Java IDE” was originally published by


Share this post if you enjoyed! 🙂

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *