Which Java IDE is best? Compare IntelliJ IDEA , Eclipse, and NetBeans for features, usability, and compatibility with your favorite tools and frameworks. Credit: Nathan Dumlao Every Java programmer needs a programming editor or IDE that can assist with the grungier parts of writing Java and using class libraries and frameworks. Which editor or IDE will be the best fit for you depends on several things: the nature of your development projects, your role in the organization, your level of programming skills, the processes used by the development team, whether the team has standardized on tools, and, of course, your personal preference. You would hope that an IDE supports the latest versions of your favorite JVM languages, including Java, Kotlin, Scala, and Groovy. You’d want it to support the most popular application servers and Java frameworks, such as Apache Tomcat, Spring, JavaServer Faces, Struts, GWT (Google Web Toolkit), Play, Wicket, Grails, Dropwizard, ATG, Spark, Hadoop, and Vaadin. A workable IDE should support whatever build and version control systems your group uses, such as Ant, 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, including JavaServer Pages, Embedded JavaScript, TypeScript, and HTML on the client side and Hibernate, JPA, and SQL for the data layer. Finally, you want a Java IDE that lets you edit, build, debug, and test your systems with ease and grace. Ideally, you’d not only have intelligent code completion but intelligent 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, the IDE should be able to connect to them. If you need to deploy to and debug on containers and clouds, your IDE should help with that. The three IDEs most often chosen for server-side Java development are IntelliJ IDEA, Eclipse, and NetBeans. These aren’t the only options, however, and we’ll also discuss a few lighter-weight IDEs. For this review, I did fresh installations of IntelliJ IDEA Ultimate 2022.1.1, Eclipse Installer 2022-03 and the Eclipse IDE for Enterprise Java and Web Developers, and NetBeans 13 on a MacBook Pro. I also checked out several open source Java projects, which I used to demonstrate IDE features. IntelliJ IDEA JetBrains’ IntelliJ IDEA, the premier Java IDE in terms of both features and price, comes in two editions: the free Community edition, and the paid commercial Ultimate edition. The main distinguishing factors are that the Ultimate edition supports Perforce, ClearCase, and TFS, as well as Git, SVN, Mercurial, and CVS; supports JavaScript and TypeScript; supports Jakarta EE, Spring, GWT, Vaadin, Play, Grails, and other frameworks; and includes database tools and SQL. Recent enhancements to the Ultimate edition include an HTTP client, profiling tools, remote development, and collaborative development. Version 2022.1 introduces a dependency analyzer, an updated new project wizard, and a notifications tool. It also has improved inlay hints, a new structural search and replace dialog, UML diagram export, a package checker for vulnerability detection, and better support for Java 18 and JUnit 5. The intent is for the Ultimate edition to earn a place on a professional’s desktop and justify a paid subscription through increased programmer productivity. If a Java developer makes $50-100K per year, it doesn’t take much of a productivity boost to give you a quick ROI on a $500-per-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. JetBrains touts IntelliJ IDEA for deep insight into your code, developer ergonomics, built-in developer tools, and a polyglot experience. Let’s drill down and see what these features mean and how they can help you. Deep insight into your code Syntax coloring and simple code completion are a given for Java editors. IntelliJ IDEA goes beyond that to provide smart completion and chain completion. Smart completion means the IDE can pop up a list of the most relevant symbols applicable in the current context, ranked by your personal frequency of use. Chain completion offers a list of applicable symbols that are accessible via methods or getters in the current context. It also completes static members or constants, automatically adding any needed import statements. In all code completions, IntelliJ 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. IntelliJ 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, IntelliJ 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. IntelliJ IDEA 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 (shown in Figure 1) and, if you wish, a list of quick fixes to the detected problem. IDG Figure 1. IntelliJ IDEA now has a dependency analyzer and manager, shown in the bottom panel of the screenshot. It can also pop up all the uses of a variable, as shown in the middle of the upper right window. The loaded project is DeepLearning4j-examples. Developer ergonomics JetBrains designed IntelliJ IDEA with flow, aka “the zone,” in mind. The Project tool window at the left in Figure 1 gets out of the way at a mouse click, so 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 popup window. While learning the shortcuts takes time and practice, eventually they’ll become second nature. Meanwhile, even without knowing the shortcuts, a developer can learn to use IntelliJ IDEA easily and quickly. The design of the IntelliJ IDEA debugger is especially nice. Variable values show up right in the editor window, next to the corresponding source code, and when the state of a variable changes its highlight color changes as well. Built-in developer tools IntelliJ IDEA provides a unified interface for 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 IntelliJ IDEA, I wished that the last change in a source code block would show up in the editor window as an annotation (like in Visual Studio); it turns out that there’s a plugin for that. IntelliJ IDEA also integrates build tools, test runners, and coverage tools, as well as a built-in terminal window. IntelliJ IDEA now has its own profiling tools, but only in the Ultimate edition. Debugging Java can be a pain when mysterious things happen in classes for which you have no source code. IntelliJ IDEA comes with a decompiler for those cases. Java server programming often involves working with databases. IntelliJ IDEA Ultimate includes SQL database tools; a companion tool, DataGrip, is a dedicated SQL IDE, and is available as part of an all-products subscription that’s only a little more expensive than IntelliJ IDEA Ultimate. 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. IntelliJ IDEA supports Docker through a plugin that adds a Docker tool window. Speaking of plugins, IntelliJ IDEA has a lot of them. Polyglot experience IntelliJ IDEA has extended coding assistance for Spring, Java EE, Jakarta EE, Grails, Play, Android, GWT, Vaadin, Thymeleaf, Android, React, AngularJS, and other frameworks. Note that not all of these are Java frameworks. IntelliJ IDEA understands many other languages out of the box, including Groovy, Kotlin, Scala, JavaScript, TypeScript, and SQL. There are currently about 19 IntelliJ language plugins, including R, Elm, and D. — Cost: Organizations pay $499 per user in the first year, with 20% off in the second year and 40% off in subsequent years. Individuals pay $149 per user in the first year, also with 20% off in the second year and 40% off after that. Discounts are available for educational, open source, startups, and other special cases. There is also a 30-day free trial. Platforms: Windows, macOS, Linux. Eclipse 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 IDEs with one that was portable and Java-based. Another goal was to eclipse Microsoft Visual Studio, hence the name of the project. Java’s portability helps Eclipse be cross-platform: Eclipse runs on Linux, macOS, Solaris, and Windows. The Java Standard Widget Toolkit (SWT) is at least partially responsible for Eclipse’s look and feel, for good or ill, and the JVM for its performance—or, some say, lack thereof. Eclipse’s reputation for running slowly harks back to older hardware and older JVMs. It can still feel slow, however, when it is updating itself in the background, especially when you have many plugins installed. Part of the overhead of Eclipse is its built-in incremental compiler, which runs whenever it loads a file and whenever you change 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 and 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 2022-3. I downloaded and ran Eclipse Installer 2022-03 and used it to install the Eclipse IDE for Enterprise Java and Web Developers, then I added the Java 18 plugin. There are many other installation packages, including the option to install the minimal Eclipse SDK and then add plugins as needed. Do note that the last option is not for the faint of heart: it’s not hard to introduce conflicts between plugins that didn’t actually say they were incompatible. The plugin ecosystem is one of Eclipse’s strengths, as well as being a source of confusion. The Eclipse marketplace contains over 1,500 solutions at current count, but community-contributed plugins may or may not work as advertised. The 1,500-odd plugins include support for over 100 programming languages and almost 200 application development frameworks. The public-domain Java servers are 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 14 application servers, including 11 versions of Apache Tomcat. The commercial Java application server vendors used to be listed here, but aren’t in the latest Eclipse version by default. Editing, browsing, refactoring, and debugging Your first experience with Eclipse can be disconcerting, and even confusing. Eclipse has some unique concepts, such as workspaces, perspectives, and views, the functions of which are determined by what plugins you have installed. For Java server development, you’re likely to use the Java, Java/Jakarta 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 start to make sense once you open the views you need. IDG Figure 2. From left to right, we’re seeing the Eclipse project explorer, the data source explorer, the source code editor with an explanatory popup for an annotation, and the class outline. The loaded project is Google Guava, a set of core Java libraries. The panes can be rearranged easily. There is often more than one way to do any given task in Eclipse. For example, you can browse code with the package 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 a quick access feature to search, and quick views to pop up things like class outlines. 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 done interactively or from refactoring scripts. Eclipse supports debugging both locally and remotely, assuming that you are using a Java virtual machine 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 shown in the help doc. 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. Eclipse has more than its share of documentation issues because the ecosystem is so big. — Cost: Free, open source. Platforms: Linux, macOS, Solaris, Windows. NetBeans 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. The current version, Apache NetBeans 13, is precompiled for Windows, macOS, and Linux, and a portable subset runs on other systems that support Java. I downloaded the macOS installer. NetBeans has fewer plugins than Eclipse, but they are less likely to interfere with each other. NetBeans 13 can automatically add features as you need them. It requires JDK 11+, and officially supports running on JDK 11 and JDK 17. NetBeans 13 includes Java SE JDK 14 as its default platform for code. You can install additional Java platforms as needed, including Java Standard Edition 8 and OpenJDK up to version 18. 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 and slightly more of them than IntelliJ IDEA. NetBeans also offers a full range of refactoring tools (see Figure 3) to allow you to restructure code without breaking it. It performs source code analysis and offers an extensive set of hints to quickly fix or enhance your code. NetBeans still includes a design tool for Swing GUIs, previously known as “Project Matisse.” (Does anyone still build Swing GUIs?) IDG Figure 3. This is NetBeans working with the code for the Neo4j graph database. Notice the extensive functionality in the context menu and its refactor submenu. The output at the bottom right is from a Resolve Project Problems operation to download missing dependency artifacts. The Inspect & Transform tool lets you run inspections across your codebase, while automatically fixing your code. 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, Ant, and Gradle. It 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. — Cost: Free, open source. Platforms: Windows, Linux, macOS, BSD. Comparing 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. But even after I believed I had firmly switched to IntelliJ, there were certain situations when I had to return to another Java IDE—such as the period when Eclipse was the only IDE supported for Android development. (The current official Android IDE is based on IntelliJ IDEA.) I have also used Visual Studio Code with the Extension Pack for Java, which I like for smaller projects. 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 do not use Eclipse. Even though it once was 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 the greatest tendency to become unusable from installing 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 budget for tools, the choice is between NetBeans and IntelliJ IDEA Community Edition. If you’re coding Java servers with little or no budget for tools, then NetBeans might be the better choice. Remember that students, open source developers, and others can qualify for a free or discounted copy of IntelliJ IDEA Ultimate. Lightweight Java IDEs While most people do best developing Java with IntelliJ, NetBeans, or Eclipse, there are still cases when you might want a lightweight IDE, or even a programming editor such as Sublime Text, emacs, or vim that has Java plugin support. Visual Studio Code with the Extension Pack for Java is very good and relatively lightweight as a Java IDE. Without the Java extensions, Visual Studio Code is merely okay as a Java editor. Red Hat’s Language support for Java extension, one of the six items in the extension pack, provides Java language support via the Eclipse JDT Language Server, which in turn utilizes Eclipse JDT, M2Eclipse, and Buildship. The Java language support goes all the way up to refactoring, which can be found in the context menus. Assuming you really do want a lightweight IDE, there are several reasonable options: DrJava is a free, lightweight development environment for writing Java programs. Designed for student use at Rice University, it currently has over 3 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. The latest version of DrJava is dated 2019 and supports Java 8. BlueJ is a free Java development environment designed for beginners at the University of Kent and 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 object-oriented programming with BlueJ. As of this writing, the current build of BlueJ is Version 5.0.3, released 28 March 2022, which requires Java 11 or higher. JCreator is a lightweight Java IDE for Windows, written in C++ for performance reasons. Originally, the paid Pro version had a debugger, Ant support, and code wizards; the free version did not. The current JCreator download is a trial version. 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. Eclipse Che supports multiple IDEs, including VS Code, JetBrains IDEs such as IntelliJ IDEA, and Eclipse Thea, and runs them in Kubernetes pods. Tips for choosing an IDE While people often choose a personal Java IDE and use it for all their projects, there can sometimes be project-based considerations for choosing an IDE. The easy answer would be to use the same IDE as the rest of the 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. You really want your IDE to support whatever build system has been adopted by the team. If it is 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 lightweight IDEs. You are going to want 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. Finally, it helps if your IDE can connect with the ticketing and bug tracking system the project uses. Again, you can get by using a standalone or web client for, say, JIRA, but you’ll be more productive if you can check in your tickets directly from your IDE. Related content opinion The dirty little secret of open source contributions It isn’t the person making the contributions—it’s how easy the contributions make it to use the software. By Matt Asay Nov 18, 2024 4 mins Technology Industry Open Source news ‘Package confusion’ attack against NPM used to trick developers into downloading malware Attackers gunning for supply chains again, deploying innovative blockchain technique to hide command & control. By John E. Dunn Nov 06, 2024 4 mins Vulnerabilities Open Source Security news Meta offers Llama AI to US government for national security US government agencies and private sector partners can now use the Llama model, but many other restrictions on its use remain. By Prasanth Aby Thomas Nov 05, 2024 1 min Generative AI Open Source Artificial Intelligence news OSI unveils Open Source AI Definition 1.0 The Open Source AI Definition will provide a reference for determining whether an AI system is truly open source AI, OSI said. By Lynn Greiner Oct 28, 2024 7 mins Generative AI Open Source Artificial Intelligence Resources Videos