The completion backend and instructions can be found here: github.com/jostillmanns/javacomplete
Add the following code to your init.el
(add-to-list 'load-path "path/to/javacomplete")
(require 'javacomplete)
The completion is using company-mode. My setup looks like this:
(defun javainit()
"tweak some defaults for java and company mode"
(setq company-tooltip-limit 20)
(setq company-idle-delay .3)
(setq company-echo-delay 0)
(setq company-begin-commands '(self-insert-command))
(set (make-local-variable 'company-backends) '(company-javacomplete))
(company-mode))
In order to load with java mode:
(add-hook 'java-mode-hook 'javainit)