Here’s a great tool named Eclim which brings Eclipse to vim and there’s an emacs port as well. I’ve tested for both vim and emacs and I think vim version is better than the emacs version. Emacs version needs work. I’m jealous.

Emacs Setup:

  • Follow these instructions to install eclim.

  • Download emacs plugin from here.

  • Move downloaded emacs plugin to your .emacs.d/

  • Write the following to your .emacs;

    (add-to-list 'load-path (expand-file-name "~/.emacs.d/eclim/vendor"))
            (require 'eclim)
    
            (setq eclim-auto-save t)
            (global-eclim-mode)
	

Whenever you need to do Java development, first open a console and run the eclimd and then open emacs.