Beware the IDEs of Java (Part 1)

Modern IDEs suck.

The JDEE, or Java Development Environment for Emacs, is an open-source Emacs package for programming in Java. It provides syntactic and semantic knowledge of
the Java programming language through BeanShell, and integrates with standard JDK and build tools.

If JDEE is the kitchen sink, then Emacs is the rest of the kitchen, providing a rich text editor, a file and directory browser, a version control interface, external shell interaction, a toplevel interpreter, and an infinitely configurable and extensible environment.

Requirements

Obtaining the Packages

# pacman -S emacs cedet ecb openjdk6 beanshell
$ wget http://downloads.sourceforge.net/project/jdee/jdee/Dependencies/elib.tar.gz
$ tar xfz elib.tar.gz
$ tar xfz pub/comp/os/unix/gnu/elib/elib-1.0.tar.gz -C /path/to/elib

$ wget http://downloads.sourceforge.net/project/jdee/jdee/2.4.0.1/jdee-bin-2.4.0.1.zip
$ unzip jdee-bin-2.4.0.1.zip -d /path/to/jdee

Installing the JDEE

$ emacs ~/.emacs

(add-to-list 'load-path "/path/to/jdee")
(add-to-list 'load-path "/path/to/jdee/lisp")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/cedet/common")
(load-file "/usr/share/emacs/site-lisp/cedet/common/cedet.el")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/cedet/eieio")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/cedet/semantic")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/cedet/speedbar")
(add-to-list 'load-path "/path/to/elib")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/ecb")
(load-file "/usr/share/emacs/site-lisp/ecb/ecb.el")
(require 'ecb-autoloads)

(autoload 'jde-mode "jde-mode" "JDE Mode." t)
(setq auto-mode-alist (append '(("\\.java$" . jde-mode)) auto-mode-alist))
(require 'jde)

;; optional configuration

(defun my-jde-mode-hook
  (message "Loading my-jde-mode-hook...")
  (define-key c-mode-base-map "\C-ca" 'jde-javadoc-generate-javadoc-template)
  (define-key c-mode-base-map "\C-m" 'newline-and-indent)
  (c-set-offset 'substatement-open 0)
  (c-set-offset 'statement-case-open 0)
  (c-set-offset 'case-label '+)
  (abbrev-mode t)
  (setq c-comment-continuation-starts "* "
	tab-width 4
	indent-tabs-mode nil
	temp-interactive t
	c-basic-offset 4)
  (c-add-style "my-java"
	       '("java"
		 (c-basic-offset . 4)
		 (c-hanging-braces-alist . ())))
  (c-set-style "my-java")
  (setq c-auto-newline t)
  (message "...jde-mode-hook loaded."))

(add-hook 'jde-mode-hook 'my-jde-mode-hook)
About these ads
This entry was posted in programming and tagged , , . Bookmark the permalink.

One Response to Beware the IDEs of Java (Part 1)

  1. hacker says:

    Too many programmers who work for the “enterprise” simply don’t care neither about the tools nor the underlying technologies they work with — for them programming is just a means to a rather hefty paycheck (just like I don’t really care about how my monitor works, as long as I see my pixels). They are not lost without their IDE — they have no idea about what they are doing in general. Unfortunately, COBOL and Java make it easy for those guys to keep on multiplying…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s