1. Install related packages:
2. Edit ~.emacs as follows:
;;; for java
;; setting jdk path
'(jde-jdk-registry (quote (("1.6.0_17" . "/usr/local/jdk1.6.0_17"))))
;; Java Development Enviroment
(add-to-list 'load-path (expand-file-name "/usr/share/emacs23/lisp/jde/lisp"))
(add-to-list 'load-path (expand-file-name "/usr/share/emacs23./site-lisp/cedet-common"))
(add-to-list 'load-path (expand-file-name "/usr/share/emacs23/site-lisp/elib"))
(add-to-list 'load-path (expand-file-name "/usr/share/emacs23/site-lisp/ecb"))
(load-file (expand-file-name "/usr/share/emacs23/site-lisp/cedet-common/cedet.el"))
(load-file (expand-file-name "/usr/share/emacs/site-lisp/ecb/ecb.el"))
;;------------------------------------------------------------------------------
;;(add-hook 'java-mode-hook 'turn-on-font-lock)
(require 'font-lock)
(require 'cedet)
(require 'ecb)
(require 'ecb-autoloads)
(require 'jde)