

Ask HN: What is the best Java IDE? - jsharpe

I've been using Java for several years, but have never really yet felt the need for an IDE. I've toyed with Eclipse a bit, but for the most part my projects have been small enough that I've just done them in vim.<p>At work I've begun using Java much more heavily, and have been introduced to IntelliJ IDEA. I really like it so far, and it's making me wonder how I ever made do without the awesome code completion and refactoring features of a great Java IDE.<p>I've had a hard time finding a really good comparison of recent versions of the major IDEs (Eclipse, NetBeans and IntelliJ), so for those of you who have used a few different Java IDEs (or even those who have only used one), what are your favourite features, or the things you most missed when you switched IDEs. Which one would you recommend to someone new to the world of Java IDEs  who hasn't yet developed too strong an allegiance?
======
jomohke
We've used Netbeans and Eclipse for previous projects, but moved to IntelliJ
last year.

The language integration is much richer - and it has a more solid foundation
for working with multiple languages. For example, find usages and refactor-
rename will work across different languages and templates. When I find usages
for a field, for instance, it shows me where it is used in hibernate queries,
EL expressions on pages, etc.

Languages can be arbitrarily nested in each other, a lot more so than other
IDEs I've used - for instance, I can still use command completion and
refactoring in nested SQL, HTML, CSS or even Javascript (eg. GWT's JSNI
methods) when it is inside java strings, or XML documents, or wherever else.

The JavaScript support far exceeds either Eclipse or Netbeans. IntelliJ has
fairly decent refactoring and completion for Javascript, which the other IDEs
(at least as of last year) barely supported.

It has full completion, find usages, and jump-to-usage within JPA/Hibernate
queries, which all ties straight back to the original entity classes.

The refactoring tools are a lot richer, and a lot faster than Eclipse or
netbeans offered. On a largish project the refactoring commands still feel
near-instant in IntelliJ -- it may not sound like such a big deal, but after
becoming accustomed to it, I use the refactoring tools _constantly_ while
writing code. I didn't do it nearly as much with the other IDEs.

The refactoring commands are all extremely solid -- for instance, the extract
method refactoring will detect similar code snippets and ask you if you want
to replace them with the method call. I never had Eclipse or Netbeans ask me
that (Have they changed in the newer versions?)

I've also found the support for Git far exceeds the other IDEs.

While the price seems expensive compared to the free competition, most
programmers use their IDE 8 hours per day -- given programmer wages, it only
takes a tiny improvement in productivity to pay for itself.

------
fusiongyro
I strongly prefer NetBeans to Eclipse. I haven't used IntelliJ, but would like
to.

The big feature of NetBeans is simply that it's fully-integrated. Out of the
box, it works with Maven, Subversion, Mercurial, etc. Comes with Tomcat and
HSQL so you can deploy your web apps from within the IDE. It requires far less
setup and just generally "does the right thing" without really requiring me to
make a bunch of decisions and install a ton of plugins. With Eclipse I never
managed to make any of that stuff work; there are many different plugins
you'll find for any given task by searching, and many of them have plugin
dependencies or are outdated or just suck. My time is too valuable to spend it
making Eclipse into the one IDE to rule them all. I have not been disappointed
by NetBeans, and three of my coworkers have switched to it since I've been
there, I suspect because they got tired of configuring Eclipse.

Just my two cents. I'm sure a lot of what I gripe about is "easy" to do, and I
certainly would admit that more is possible with Eclipse, but the tradeoff
just doesn't seem worth it to me.

~~~
kls
_I strongly prefer NetBeans to Eclipse. I haven't used IntelliJ, but would
like to._

I have used IntelliJ and I far prefer Netbeans from 6.7 on. I suspect a lot of
people used an older version of Netbeans but after 6.7 it is probably the most
well integrated IDE available for Java as well as an assortment of other
languages.

Someone said the Javascript support was better in IntelliJ product and I just
don't see that, Netbeans has better support for Javascript than ever Aptana
Studio as well it supports the syntax of all of the major JS Toolkits from
Dojo to jQuery.

Netbeans rivals Visual Studio when it comes to an well integrated environment
that provides UI's for SQL / DB managment, HTML, CSS, XML, JSON, Server
managment and is the first IDE that I did not feel like I was roughing it in
since coming back to Java from doing some .NET work for a couple of years.

------
snprbob86
I am currently a serious Vim user, but I was once an IntelliJ addict. I
_highly_ recommend it. It is orders of magnitudes better than Eclipse and
NetBeans. If you do consider plunking down the cash for a license, _force_
yourself to use the refactoring tools as much as possible. If you are
primarily editing a single, strongly-typed language, then you can't go wrong
with anything from JetBrains. IntelliJ IDEA, Resharper, etc. All brilliant.

On a bit of a tangent: If you are editing many different types of text (In my
case: HTML/Templates, Sass/CSS, Javascript, Python, config files, a little bit
of Java/Scala, etc.) then go completely IDE-free and learn Vim or Emacs. For
me, the IDE vs Text Editor debate comes down to the question "Am I primarily
editing one type of code in a single strongly typed language, or am I
primarily edited _text_?"

~~~
jomohke
I would phrase that question as "Am I editing one file, or a project of
files?". As a Vim user, who previously only used IDEs for java projects, I now
use IntelliJ for HTML/CSS/Javascript projects too. If you learn the
refactoring and completion shortcuts, I believe it beats VIM at most multi-
file projects.

If you install the Ruby plugin (also built by JetBrains, for their Ruby IDE)
you get support for Sass - and they've just announced support for Less and
Sass3 in the next version, including command completion and jump-to-
declaration. [http://blogs.jetbrains.com/ruby/2010/07/whats-mining-
leaner-...](http://blogs.jetbrains.com/ruby/2010/07/whats-mining-leaner-css/)

The Scala plugin doesn't seem too bad either, but I haven't used it
extensively. It already has some simple refactoring features.

They're also working on a Python IDE, which is in beta, so the Python plugin
will get fairly good too.

------
mindcrime
I prefer Eclipse, but I haven't spent much time using Netbeans or IntelliJ, so
I can't really say that Eclipse is "best." I can just say that it works very
well for me, and has a rich ecosystem of plugins and additional tools that I
find handy.

On the downside, Eclipse is awfully memory hungry in my experience. Not sure
how it compares to Netbeans or IntelliJ though.

~~~
ido

        On the downside, Eclipse is awfully 
        memory hungry in my experience.
    

I've heard that before, but I can't really understand why - I haven't had
memory issues with eclipse in years.

I thought it might be because I've had at least 4gb of RAM in every computer
I've used for several years now, but when I checked its memory usage eclipse
was using around 250mb.

I've asked a friend who uses a netbook with 1gb of ram and he uses eclipse
without issue on a regular basis as well, so I'm really not sure where this
myth comes from.

Maybe people are just loading up their eclipses with a ton of plugins?

~~~
skybrian
Memory usage depends on how much source code you have. A startup will never
have enough source code to worry about it, unless you do something silly like
compiling all your third-party libraries from source. It wasn't until I joined
Google that I started seeing performance issues.

------
jonpaul
I really like Eclipse, although lately I've read a lot of vitriol towards it.
It works for me, but then again I only use Java for GWT and Google's plugin is
only for Eclipse. But its refactoring capabilities are satisfactory for me.

I use Netbeans for Rails, but I've never really gotten into using it for Java.
Although, I hear their Swing WYSIWYG editor is nice.

I've never used IDEA, but I've never read one negative thing about it. In
fact, I've also get the impression that a lot of developers swear by it. I
just don't want to pay for it.

~~~
skybrian
There is a free, open source version of IDEA now (without all the plugins):

<http://www.jetbrains.com/idea/free_java_ide.html>

------
ambrice
I use vim with the brilliant eclim plugin to write java code on my netbook.
<http://eclim.org> Lets you run eclipse headless and communicate to it through
vim to get the fancy IDE stuff like code completion, automatic imports, etc.
Best of both worlds, especially when coding on a netbook and not having the
screen real-estate to run an IDE.

------
drfugly
Netbeans with the jVi plugin for my vim bindings is where it's at for me.

------
quicksilver03
I have done a comparison of Java IDEs, but it was more than 3 years ago and a
lot of things have changed since then. Today I don't bother with JDeveloper
anymore, I use NetBeans only if I want to hack on the JDK sources, Eclipse
only when imposed by the client, and my choice is IntelliJ IDEA.

If you're interested, the comparison is at
<http://www.datafaber.com/post/view/id/521> .

------
neverov
BTW, Idea has nice VIM plugin: <http://plugins.jetbrains.net/plugin/?id=164>

------
mark_l_watson
I prefer IntelliJ IDEA but in the past I have used Eclipse and Netbeans for
long periods of time.

I find IntelliJ's support for Scala and Clojure to also be good. I built the
open source version from source, and kicked its tires also: worked with the
Clojure and Scala plugins but does not support much J2EE stuff - you might
want to give that a try.

------
mondodello
IntelliJ IDEA rocks! I have used all three IDEs being discussed here and I
would vouch for IDEA any day.

As already mentioned, besides other things, IDEA's refactoring is super solid.
The ease with which one can perform such functions using IDEA actually
supports their tagline - "... develop with pleasure!"

It's SVN integration is also good.

------
Random_Person
I need to keep track of this thread. I have not heard of some of these before.

I'm currently learning with Notepad so I can force the syntax on myself. Is
this a bad idea for a newb? I have Notepad++ but I haven't fired it up for
Java yet, I just like it because I'm used to Geany on my linux machines and it
feels similar.

~~~
brown9-2
An IDE can help you learn syntax as well, with the added benefit that your
code is compiled incrementally every time you save the file (at least with
Eclipse), meaning you don't need to drop back down to _javac_ each time you
want to compile, and then compare the results in a command window to what is
in your Notepad session.

So really, would you prefer to get red squiggly lines to show you your errors
as you type, or would you rather try to get it perfect first before having to
run a command-line program for compilation?

~~~
Random_Person
That's some cool stuff. I had no idea that there were IDE's that did
incremental compiling.

On the other hand, spell check made my spelling take a dive, so I had to
consciously decide to stop using the right-click and replace-- hmm.

------
ihanif
If you can live with a bit slow but loads of plugins, stick to Eclipse. Bonus
point is, you can use the same IDE for other languages (if you switch to other
languages), withou wasting more time to bypass the learning curve.

------
wsppan
I prefer Eclipse but if I am forced to use maven as my build environment then
it is IDEA.

------
ashitvora
VIM

~~~
ashconnor
...is not an IDE.

------
gizmomagico
Notice a common theme here? Everyone who's worked with IDEA says it's the
best, and I agree.

A few years ago, IDEA was even more the-best than now, because the gap with
Eclipse was wider. Nowadays Eclipse probably has most of the functionality,
but there's still the difference that usually exists between open-source and
commercial software. The commercial software tends to be better to use.

