Has anyone had any success in configuring emacs for Java development? I installed cedet and malabar mode but couldn't get to use it successfully. Is it even worth spending more time setting up emacs or should I switch to Eclipse? I'm a long time Emacs user. Thanks a lot.
-
4If you're a long time emacs user, it'd be hard to "Switch to eclipse". [Here are some details about setting up Jdee](http://www.emacswiki.org/emacs/JavaDevelopmentEnvironment). – Noufal Ibrahim Aug 11 '12 at 06:26
-
duplicated with http://stackoverflow.com/questions/156529/what-is-the-best-way-to-do-java-development-in-emacs?rq=1 – Mohammad Efazati Aug 11 '12 at 06:29
-
6@Efazati that's a 4 years old question. It's worth to revisit questions from time to time to account for newer developments. – Tom Aug 11 '12 at 07:03
-
@tom that answer is emacs wiki. so thats more complete than this page ;) – Mohammad Efazati Aug 11 '12 at 07:06
4 Answers
You can try eclim which has an Emacs interface. It uses Eclipse as a backend to provide intelligent Java completion features for Emacs. This way you can have the power of Eclipse in Emacs without having to completely to switch to it.

- 7,515
- 7
- 38
- 54
-
-
3avoid it. You don't need to get eclipse slower... and it is not well integrated – 0x41ndrea May 30 '13 at 20:18
I've been using the Java Development Environment for Emacs for a decade now. You can get it at http://jdee.sourceforge.net/
It was last updated in 2010, and it's definitely not as powerful as Eclipse, but if you're addicted to Emacs, it provides a lot of great features, including creation of code from templates.
The dependencies are also available for download from the same SourceForge site.

- 5,585
- 2
- 23
- 35
-
Rajesh, can you please share how you installed it? I did all the needful but it doesn't seem to work. Thanks. – pranavsharma Aug 13 '12 at 06:16
-
Might be a little more useful if you explain what you did, so that we can work on fixing that. – Rajesh J Advani Aug 13 '12 at 13:06
Eclipse is, actually, the only IDE that I know that can be configured to use Emacs-like navigation and typing. But this support is horrible! Eclipse lacks a lot of Emacs features, so it's not even the matter of proper mapping - a lot of things aren't implement (or, perhaps, impossible to implement). Also, this support is often untested and overlaps with accessibility hotkeys, i.e. whenever you'd try to use M-g g you might instead activate some button in the GUI that has access key g, and the next access key g, again, something like Alt + Debug Configuration >> Configure. Worst yet this is unpredictable, because the access keys might change according to layout.
OK, I invented the example above, but this is because the real life cases are more involved. They do exist, however. Besides, in Eclipse, you must use mouse fairly often. For example, switching between windows inside of it is not possible without it. Actually, you cannot even create a file w/o using mouse.
I tried JDEE some time ago, but, so far I could understand, the project isn't actively worked on any more. However, Debian provides jde package, and it loads and seems to work, it comes as elc files (no sources). I wanted to use newer CEDET (which comes with newer eioei), but they wouldn't work together. I also had problems either configuring or using the debugger - as far as I remember it kept disconnecting, perhaps, not being able to work with newer JRE. I haven't investigate it much further, but I used certain things pretty often, such as Maven and Ant builds - those, however they seem a bit archaic, worked well, can't remember any problem with that.
I believe that if there's anyone patching JDEE, those would be the same people who work on CEDET. So, it might make sense to ask on their mailing list about the status of the project, perhaps they know more.
Ok. This is a very old question but I would like to add answer to it.
For all those who want to use emacs keybindings but need a good IDE for java development use Intellij. I recently moved to Intellij from eclipse and Intellij is way better than eclipse. It has default emacs key bindings which work exactly like emacs. You can use it in the console and other places as well! Give it a try.
The best choice for java development with emacs keybindings is certainly Intellij

- 1,086
- 7
- 20