Which IDE is mostly used for Java?
Show
Rounding up the best IDEs for Java programming.It’s statistic time! Did you know that the average developer spends 76% of their time writing, improving or testing code?1 Most of your time is spent writing, improving or testing code Source: Data from TideLift/The New Stack 76%!! Crikey. So if you’re going to spend three-quarters of your working week (that’s 30 hours for most of us) writing or debugging code, you should try to make that time as productive and enjoyable as possible… right? This is why most Java developers use an Integrated Development Environment, or IDE, to write code. An IDE gives you insights about your code, automates those annoying repetitive tasks… and can sometimes save your ass. But which IDE should you use for Java? In this article, we’ll see:
Let’s get into it. Top picksHere are our favourite IDEs: Java IDE BasicsIn this first section, let’s take a look at IDEs in general – what they are, and whether you need one. What exactly is an IDE?An IDE, or Integrated Development Environment, is a program which helps you write software. An IDE helps you organise your software projects, write code, and then test and debug it. Popular IDEs include Eclipse, IntelliJ and Microsoft Visual Studio. An IDE usually includes features which help you to:
Can an IDE do other things? Sure! And many of them do. Some IDEs add features for running tests, writing documentation, and even creating diagrams. But coding, compiling and debugging are three core features of any decent IDE. Do you need an IDE to write Java code?No, you don’t need to write
Java code in an IDE. You can use any text editor you like, and then compile the code with You could be writing code for the Mars rover, nuclear power stations, or even financial trading algorithms, with trusty Windows Notepad, and I’ve even met Java developers who write code in Vim (the Linux text editor), and then run it all in the Terminal. And they still write excellent code. But, there are a couple of good pieces of advice worth remembering: If you’re just starting to learn Java, use a text editor firstA lot of people say that when you’re a Java beginner, it’s better for your learning to write code using a plain text editor. But why? If an IDE can do all of the work for you, why start out creating programs by hand? Coding by hand helps you see the basics of the language, and it will give you way more confidence in future, if you have to troubleshoot a problem. If you are completely reliant on an IDE, and you have no knowledge of what the IDE is doing for you, you will find it harder in future to solve problems. An IDE is useful once you’re past the beginner stageBut once you’ve moved on from the beginner stage, you will probably benefit from using some kind of graphical desktop program that helps you to write code. An IDE helps you organise your projects, run tests, compile the code, format it correctly, and much more. Now you’ve decided you want a Java IDE. That’s why you’re reading this article! (Hi!) So how do you pick an IDE? What are the features to look for in a good Java IDE? We’ll look at that next. Choosing an IDEIf you have the freedom to choose an IDE, then you’re probably wondering what you should look for. What makes a great Java IDEA developer’s IDE can be a very personal choice. (I said earlier that there are many developers who prefer to write code using Vim, the Linux text editor!). But here’s what I expect any IDE to be:
A great IDE helps you automate boring tasks, but also gets out of the way when you need to concentrate and write code. Does it matter which IDE you use?If the code is the same, then does it really matter which IDE you use? Actually, yes! Researchers at Microsoft and the University of Victoria BC conducted a survey of engineers. They found that engineers ranked poor engineering tools as one of their biggest challenges they face in their job. It’s a bigger challenge even than things like a bad manager or experiencing too many interruptions. So your choice of engineering tool – like an IDE – can make a big difference your job satisfaction and productivity. What if I can’t choose my own IDE?If you’re learning Java in your spare time, then you’ll be free to choose your preferred IDE. But if you’re starting a job as a Java developer, you should have the freedom to choose your own IDE too. If they don’t allow you to choose your own IDE, I would challenge it! You’re going to be spending up to 8 HOURS per day with this application. It needs to help you do great work. Desktop Java IDEsNow let’s look at the top desktop IDEs – for running on your laptop, or desktop PC. The most popular Java IDEsSome of the top Java IDEs in use today are:
Here’s my review of these 5 Java IDEs:
IntelliJ IDEA (Best desktop Java IDE)
After years of trying out each of the different top Java IDEs, I’ve settled on my recommended choice. The best desktop Java IDE in 2022 is…. IntelliJ IDEA. 🙇♂️ I’ve spent the last 10+ years developing with Java. I’ve tried all the big five – NetBeans, Eclipse, Visual Studio Code, JDeveloper and IntelliJ – and I have not found another desktop IDE that beats IntelliJ for productivity and speed.
Best Desktop IDE for Java Developers: IntelliJ IDEA Community Edition
Free Download Why it’s a great choiceHere are some of the features in IntelliJ that make me think it’s the best Java IDE: Fast global searchUsing fuzzy search you can quickly go to any piece of code in your project. This means less time fiddling around in the project tree, trying to remember where that class went. You can also use this feature to instantly decompile your dependencies and have a look at the source code. Just press Left Shift twice to activate global search: Search in IntelliJ is great Solid plugin ecosystemIntelliJ is extensible with plugins. I use the Apache Camel plugin all the time, for example. But my favourite plugin is the Nyancat plugin. Get a flying rainbow cat in your IDE, While-U-Wait: Flying rainbow caaaaaaat Amazing unit test runnerOnce you start writing unit tests for your Java applications, and start running them in IntelliJ, you won’t want to run them any other way. They run quickly, and you can also debug your tests very easily. Running unit tests in IntelliJ IDEA Which brings me on to… Great debugger and decompilerOnce you start creating complex programs, or using external frameworks, you’re going to need a solid debugger and decompiler. The decompiler allows you to see the source code of the classes you’re using, so you can figure out what’s really going on, in any library you’re using. Instantly view decompiled source code in debugging In the debugger, you can inspect any object, step forward and back through code lines, and more: Inspecting objects while debugging Both of these features are absolutely amazing in IntelliJ, and I would be far less productive if I didn’t have them. First-class support for MavenIntelliJ’s support for Maven is great, and specifically the Maven tool window is a blessing for me. It helps me to visualise all of my dependencies, goals (the “executions” that you run in Maven) and more. Watch my short video on how to understand a Maven project with IntelliJ IDEA: It’s stableIn all the years I’ve used it, I’ve had very few crashes. When I use Eclipse, I tend to get poor performance and crashes (sorry Eclipse!) Automatic code formatting, with sensible defaultsOne of the annoying things about other IDEs is that they don’t take a strong stand on code formatting. Well-formatted code makes it so much easier to share and collaborate with other members of your team! If code isn’t formatted correctly, you can literally waste time when you’re learning someone else’s codebase. You have to figure out their weird formatting approach, or why some files have been indented with Spaces and some have been indented with Tabs. (By the way: you make more money if you indent with spaces.) IntelliJ formats everything as you type, and will even format code you paste from the clipboard. This is crucial when you’re working as a team. You don’t want to be that developer, whose code everyone else struggles to read because it’s not formatted correctly and looks weird. Do you need the (paid) IntelliJ Ultimate Edition?I don’t think you will even need the Ultimate (premium) edition of IntelliJ. I’ve used the Community (free) edition for 5 years. I’ve never paid for the Ultimate Edition, and I’ve written and debugged code for various platforms like Spring, JBoss, OSGi and more. The verdict on IntelliJI don’t even own a paid licence for IntelliJ IDEA; I use the Community Edition. But I think it is truly the best IDE for professional Java developers. IntelliJ has helped me become massively more productive as a Java developer. Not only can I write code quicker, but my debugging and problem-solving (which is how I spend a lot of my time) is made much easier too. The reasons I recommend IntelliJ is because of its speed, stability and awesome testing and debugging features. But primarily because it’s fast and stable. (Did I say it’s stable?) If you’ve graduated from beginner Java, and you’re looking for an IDE which will support you in writing great Java programs, then you should definitely think about IntelliJ. Visual Studio Code (Best Java code editor)If you don’t want a full-blown IDE, but you want to be able to write Java code, then there is a decent alternative to IntelliJ IDEA, which comes in second place overall: It’s Visual Studio Code with the Java Extension Pack.
Best Java Code Editor: Visual Studio Code (with Java Extension Pack)
Free Download I call VS Code a code editor with Java support features, rather than a full-blown Java IDE. This is because, first and foremost, it is a text editor which can be expanded with extensions. VS Code is great…. but…. it just doesn’t understand Java as well as IntelliJ. What I mean by that is, it doesn’t have the same level of deep understanding of your code, and the whole Java ecosystem. You can achieve a lot of the same features as IntelliJ by installing plugins, but my view is that these features should be built-in to the IDE, and not left to individual plugin contributors to write. I’m sure at some point, VS Code will have Java support to rival IntelliJ IDEA. But, until then, I’m sticking with IntelliJ IDEA as my Java IDE recommendation, and VS Code as a solid second place. What if you can’t install an IDE? Then try an online one. Let’s dive in. Java IDEs for BeginnersSo which should you start with if you’re a beginner? NotepadNo, seriously! Start with Notepad first. And then consider moving on to… BlueJBlueJ, named after the bird (the Bluejay, in case you were wondering). Online Java IDEsIf you want to develop Java programs, but you can’t install a Java Development Kit, you can still code using an online Java IDE. Online Java IDEs run in your web browser. They aren’t all as feature-rich as their desktop counterparts, but they’re certainly catching up! How does it work? Thanks to a little browser magic: Your web browser doesn’t natively run Java code, so usually your code gets passed to a back-end server, which runs it and returns the result back to you. Here’s some of the best options. GitpodPull and run code directly from Git repositories, with 50 hours free per month. The Gitpod team have built something pretty impressive. It’s a browser-based IDE which uses the familiar VS Code UI – so you can even install Visual Studio Code extensions if you want them. Working on a Java application inside Gitpod … hmm that UI looks familiar! It’s pretty good. I pointed it at one of my GitHub repos, and it opened it within seconds, and it automatically set me up with a Java 11 workspace with Maven. Love it. It all runs online, and you can even expose your application’s web ports. So if your application has a REST API, you can test it directly in your web browser. On the free plan, you get 50 hours per month – which should be plenty for your weekend coding projects! RijuA simple online playground for Java (and dozens of other languages). Riju is a simple online Java compiler. It loads super-fast, and is great for writing simple, command-line Java programs. The Riju online Java compiler is very simple And, it’s open source. (Riju isn’t exactly a full-blown Java IDE, and you can’t pull in dependencies, but for simple programs, it does the job.) Riju supports lots of other languages too, such as “Brainf***”. So if you’ve ever wanted to program in that language, check it out! The project costs money to run, so if you use it a lot, make sure you chuck a tip to the developer. (See the sponsorship links on the GitHub repo.) ReplitWrite command-line Java programs in your browser, with some limited support for Maven dependencies. Replit is a rich tool for writing programs in the REPL style. You edit your code in an editor like this: Editing a Main class in REPL.it And then press Run to see it compiled and executed. It’s free on the Starter Plan, but they’d like you to upgrade to a paid plan, which allows private repositories, and access to more storage and resources. You can have a play with an embedded REPL.it here. I created a Java application with a Now get coding!So, there you have it. My recommended IDE for desktop-based Java development is IntelliJ IDEA. If you prefer a code editor with additional Java support features, then I recommend Visual Studio Code with the Java Extension Pack. And finally if you want to do some online Java coding, then try Riju, Replit or Gitpod. Now you’ve seen the recommendations, what are you waiting for? Is IDE needed for Java?Do you need an IDE to write Java code? No, you don't need to write Java code in an IDE. You can use any text editor you like, and then compile the code with javac .
Is Eclipse the best IDE for Java?A dedicated Java IDE, Eclipse was released in 2001, and is available on Linux, Mac, Solaris, and Windows. It is considered by many to be the best IDE for Java. It is also available as a cloud edition. There are an array of plugins available on the Eclipse Marketplace, which adds to the functionality.
|