views:

743

answers:

11

I recently started using Eclipse at work for my Java servlet projects. I've been using jEdit for years, which is a uber-powerful text editor. It has syntax highlighting, but it doesn't have any language-specific features like code completion and intelligent refactoring. I'm finding that's hindering my productivity. I desperately want to like Eclipse. I really do. But I keep running into problem after problem.

  1. Now that Eclipse can use an ant script to build, instead of just creating its own build environment from an ant script then ignoring any changes to it, I found some online guides and set it up. It doesn't seem ready for prime time, though. My ant script builds fine from the command line, but I get all these build errors because I need to tell Eclipse all this stuff the build.xml already has in it, like the CLASSPATH, and where external jars are.
  2. When I leave Eclipse running for too long, or sometimes after my laptop wakes up from hibernate, the UI starts breaking. For instance, the tabs on the editor pane disappear, so I can only edit one file at a time, and it doesn't say which one it is.
  3. We have faced several instances where classes weren't rebuilt that should have been, leading to inaccurate line numbers in debugging walkthroughs and other unpredictable behavior (this isn't just me; the two other developers trying it out with me are seeing the same thing).
  4. I find it a huge hassle that the workspace is in a different place than my source code. I have other files I need to edit (xml files, etc), and for each directory I want to edit files in, I need to set up a special entry, and it doesn't even default to where my source code is when setting that up.

Do others face these same issues?

Are there better alternatives?

+4  A: 

I love IntelliJ, but it's commercial. Eclipse feels like a buggy, half-hearted knockoff compared to it. To the point that IntelliJ's worth the cost.

sblundy
+1 for IntelliJ. Worth every penny.
duffymo
and now there is a free edition as well
Daniel Schneller
+3  A: 

Try NetBeans

A free, open-source Integrated Development Environment for software developers. You get all the tools you need to create professional desktop, enterprise, web, and mobile applications with the Java language, C/C++, and Ruby.

John
<3 NetBeans (when working in Java, which isn't that often to be honest).
Bernard
John, NetBeans looks like a good alternative, and it also does PHP, which I work in a lot. Thanks.
dj_segfault
A: 

Partial, hopefully helpful answer to

4. I find it a huge hassle that the workspace is in a different place than my source code. I have other files I need to edit (xml files, etc), and for each directory I want to edit files in, I need to set up a special entry, and it doesn't even default to where my source code is when setting that up.

... you can configure the location of both your workspace and your source code, if you want.

Thomas
My question would be: Why isn't it that way out of the box? Eclipse is too complicated, too bloated. I was grateful to have something free when I worked for an employer that wouldn't invest in tools, but now that I know better I hope I'm never forced to use it again.
duffymo
A: 

Most of my time in Eclipse has been spent doing ColdFusion so I can't speak to ANT scripts or compilation. I too noticed that odd things would be more likely to happen if Eclipse was left running for an excessive amount of time. Aside from that, most other buggy-ness could be resolved by making sure that my JRE was the latest version.

kooshmoose
A: 

Eclipse can be quite a change, especially coming from something like just a text editor, or Visual Studio

  1. try to let Eclipse build the project itself, without the help of ant. Leave ant to a handwritten build.xml file to build the project from the command line outside of eclipse, e.g., on yer build/release machine.

  2. low on memory?

  3. are you going back and forth between building the project w/ant and then having Eclipse trying to build the project too? i.e., are the builds "fighting" with each other? see 1.

  4. yes, one of the things that you would need to get used to... accept, rather than fight, the "eclipse way"; you have to put your working source files somewhere, then why not in Eclipse's workspace folder?

hope that helps/makes sense

totally agree with your answer about 4.
marcospereira
1: It's dangerous from q QA point of view to have two different build systems.4: All project files are in Subversion, so my svn working copy has all these files that are not source code, but I still need to edit sometimes. If I put them in my workspace, they won't be in Subversion.
dj_segfault
+11  A: 

Eclipse works best if you leave the project folder structure to its management. We are working with 15 developers on a project of several thousand classes and even more XML and .properties files.

I agree there are problems with ANT integration, so for production and nightly builds I recommend an external build system based on ANT scripts started from a shell.

However while working in Eclipse make sure you have the automatic build feature on (it should be by default, but checking does not hurt). This should free you from any concerns regarding what to build and when. Sometimes (very rarely for me) there are problems when I have to switch of the automatic build, clean all projects and trigger a manual build via the menu. From time to time I have to trigger the build multiple times (not the cleaning!), but once everything has been built again, turning the auto-build on works great again.

As for long running instances: My machine keeps logged in basically all the time (day and night) and there are at least two Eclipse instances running at all times. I have not seen any problems with these sessions, even when they remain open for literally weeks.

Most of the problems I have seen in the 5 years I have been using Eclipse originated from people installing too many plugins - the only stuff I have added is Checkstyle, the "implementors plugin" and some proprietary stuff for the application framework we are using.

Maybe you can try using a rather clean Eclipse installation the "usual way" for a while (i. e. with the sources imported to the workspace folder).

Regarding NetBeans: I use it from time to time as well, but I think it is a matter of taste and I like Eclipse better. This may be different for you.

Daniel Schneller
Plugins are great strength and great weakness of Eclipse. You can do anything with a plugin, up to and including blowing you foot away.
sblundy
+1  A: 

Like some other people already have suggested: there are more good Java IDEs besides Eclipse. The strong point of Eclipse is the plug-in system. There's a wealth of functionality available and some of it is indeed very good. That said: I do not use Eclipse, but NetBeans at the moment. NetBeans feels less clunky, is more responsive and has a cleaner feel.

When my main job was Java programming I've used IntelliJ a lot. IMHO IntelliJ beats both NetBeans and Eclipse as far as coding is concerned. It's faster, has better refactoring possibilities, better search, quick navigation and the list goes on.

To a large extent, picking an IDE is a matter of taste, as well as experience. A lot of people feel more happy with the devil they know...

Jeroen van Bergen
A: 

As someone else has mentioned, try NetBeans, It's similar to Eclipse in that it is a platform that supports an IDE, and is plug-in based. Its build system is also already based around Ant, allowing you to tap in at various extension points. In general, I've found it a bit more stable than Eclipse as well, but YMMV.

Nerdfest
A: 

For issue number 1, you can setup custom builders for eclipse. To do so, right click on the Project and select Properties. On the left there is a item called Builders, select that.

Based off of what you are saying, you will want to remove the Java builder and replace it with a new Ant Builder. This can be done by clicking New and selecting Ant Builder. This will bring up a some configuration to fill out.

In the configuration, the two most important parts are the Build File in the Main tab and the Targets tab.

For issue 4, I would recommend having your project try to be independent of its location on disc. That way everything is in the same tree. Otherwise, the solution would be to setup external directories. From what it sounds like, not everything is in the same 'source tree', which brings up source control issues.

deterb
A: 

We have eclipse manage things the way it wants, and use ant4eclipse (a set of ant tasks) for continuous builds. Works great!

Scott Stanchfield
A: 

Eclipse is a great tool. Hardly ever had problems with it in the many years that I've used it. It always amazes me how so many people can have problems with it. Then again, I'm using it as a fairly basic editor. I'm either lucky or my lack of problems stems from the fact that I'm not expecting it to be much more than a smart editor.

Eelco