Blog4Java

A personal and Java blog, likely only for me

Just for fun: trying the best 3 IDEs for Java

| 2 Comments

Not only for fun. It’s also to open my mind.

Introduction

Since a few years ago, I try to use several OS in order to improve my computing skills: Windows 7/Vista, OS X (Lion currently) and my favorite Linux distribution, Ubuntu (Sheldon Cooper dixit). You can also include Android (my wife’s smartphone) and iOS (my iPhone and our iPad)

Suddenly, I realize that I’ve been enriched, and you’re able to do a lot of more things because you have your mind really prepared for thinking instead of conditioned by a single line of sight.

I observed the same improvement when I began to use Maven for Java development. I didn’t quit my IDE, but regarding compilation, the important things are the source code and bytecode. You shouldn’t think about settings, preferences, project configuration and some other artificial stuff that the IDE needs, but that is not your concern.

So I’ve decided to try the 3 most popular IDEs for Java currently available.

Context

During the last 2 months, I’ve been changing between projects I work in more quickly than I used to be accustomed, and that has allowed me to choose the IDE for working.

The title says it’s been for fun, but I’m using them in professional environment. Besides, the goal is not to decide which is better (it’s hard to be that rude with the others) or worst (well, it seems it’s an easy decision, because the worst Java IDE is JDeveloper, doubtless). What I want to find out is which of them is more productive for me.

Let’s see the first impressions.

Eclipse

Actually I don’t use Eclipse, but Spring Tool Suite, “an Eclipse-based development environment that is customized for developing Spring applications”. You know, Eclipse on Spring steroids.

I’ve been using Eclipse as my main IDE for years, even before it was released (Visual Age for Java was the IDE that I used in my first professional project). Thus, I’m very used to writing programs with Eclipse.

The version that I’m currently using is 3.6.0, that is based on Eclipse 4.4 (Luna)

Let’s summarize my first impressions:

Pros:

  • It comes in a compressed file, no native installer. That allows me to place the program in the same location on every OS (in my case, an Application folder within my user home)
  • The shortcut keys
  • Typing assistant. I love to type “main” and have an entire main method written, or “sysout” and obtain a complete log sentence.
  • The view and the perspectives is the most interesting way of organizing the IDE

Cons:

  • It crashes from time to time. Annoying.
  • It seems to consume a lot of memory
  • The TC server that it includes is based on Tomcat 7, so it doesn’t recognize Servlet 3.1 projects
  • A custom way of building code. No native support for tools like maven, gradle or ant. There are appropriate plugins, but having to update Eclipse projects to reflect maven changes is somewhat annoying
  • On Ubuntu and on OS X, the icon in the Docker runs the previously installed 3.5.1 version. Maybe is the OS fault, due to the lack of installation.

NetBeans

I’m talking about NetBeans 8.0.

It’s hard for me to evaluate Eclipse, because it is the IDE that I use on a daily basis since a long years ago.

On the other hand, it’s very easy to describe the first impressions with NetBeans.

The installer works fine and the application runs smoothly, but I miss the way Eclipse are organized and its shortcuts (delete line: Ctrl/Cmd+D vs Ctrl/Cmd+E)

However NetBeans is likely the best among the three IDEs (not so hard to decide, apparently)

I got used to NetBeans in a few hours. Yes, hours. NetBeans has the more natural appearance for programming.

Actually, it includes all the options that Eclipse has, but sometimes with different key combination.

Besides, NetBeans is pure Java using external tools for compiling (maven, for instance)

Furthermore, it comes with Tomcat and GlassFish and a several of useful tools easy to configure with pluggins.

Does it have flaws? Of course, sometimes it get locked in a long wait operation and you can do nothing but wait.

Another tricky issue is that it uses an external tool to compile, maven for instance, so the program doesn’t exist until the project is built and neither you have the dependencies until maven downloads them. But worst than that is, if you compile successfully, but later on you introduce a compilation error, when you execute again, it runs the previously compiled version, because the current can’t be compiled due to the error.

Eclipse shows you an alert if there are compilation errors in your project before executing it.

IntelliJ IDEA

I’m sure that this is the best IDE ever, it seems so, but it makes me a little bit unproductive.

Eclipse is some kind of a de facto standard, and NetBeans is an easy to use program. But thanks to IntelliJ IDEA 13.1, the JetBrains Web Help has been the most visited page this week.

Besides, I don’t know what is doing the IDE. I don’t know whether the files are saved automatically, I don’t know when compilation is performed, and so on.

The worst thing in my humble opinion is that it doesn’t have any application server in the community edition. Please, at least Tomcat. But it has not.

Regarding shortcuts, it uses Ctrl/Cmd+Y for deleting lines, seriously?, the universal shortcut for “redo”? Yepes. And the rest of shortcut keys are really hard to do (Ctrl+F4 for closing a file)

I will try it later again, but currently it’s not my preferred choice.

However, once you discover how to use it, it’s the one that runs better. It seems not consume a lot of memory and it never blocks nor has crashes.

On Ubuntu, I have to start it via command line.

Summary

Of course the three programs are very good IDEs, but one by one:

  • I feel a little bit lost with IntelliJ IDEA. It’s great but it’s hard to find the standard options.
  • I love Eclipse and its shortcut keys, and I don’t care its flaws because I’m used to them after all these years. It will be my preferred IDE for a while, but NetBeans is now here.
  • I didn’t like NetBeans, but the version 8 is a great program. It doesn’t matter if you haven’t use it before, is a very natural program. It makes Java development the way it has to be. Now I like it a lot.

Some final words: they are all very good and easy to use for Java debugging. And I’m glad now I can use any of them if I had to.

An alternative for short projects is a text editor (Sublime Text, for instance) and a good build tool (maven or gradle, as you wish)

I have to try Web Based IDEs, as Alexander J Turner suggested.

That’s all for now.

Author: Javier (@jbbarquero)

Java EE developer, swim addict, occasional videogames player, fan of Ben Alex and Shamus Young, and deeply in love with my wife. Sooner or later I'll dedicate a post to expand this simple introduction.

2 Comments

  1. geertjan.wielenga@oracle.com'

    In the Options window of NetBeans (under the Tools menu), in you can switch to Eclipse keyboard shortcuts (in the Keymap tab)! Welcome to NetBeans, happy to hear you like it.

Leave a Reply to Geertjan Wielenga (@GeertjanW) Cancel reply

Required fields are marked *.