2009年1月10日

[Emacs / Java] JDEE on Windows (1)

Quick Reference about Install JDEE (Java Development Environment for Emacs) on Windows. (Summary of JDEE Installation Guide)

  • Install Emacs.
    1. download emacs.
    2. install to "C:\Program Files\emacs".
    3. register emacs:
      cd "C:\Program Files\emacs\bin"
      addpm
  • Install Java Tools.
    1. download Java SE Development Kit (JDK) 6 Update 11.
    2. download Java SE 6 Documentation.
    3. install to "C:\Program Files\Java\jdk1.6.0_11".
  • Install Cygwin.
    1. download setup program.
    2. install to "C:\cygwin".
  • Install JDEE, CEDET, Emacs Lisp library and ECB.
    1. download jdee, CEDET, elib and ecb.
    2. unpack them to "C:\cygwin\home\username\emacs\site\".
    3. the directory tree looks like:
      C:\cygwin\home\username\emacs\site
      C:\cygwin\home\username\emacs\site\jde
      C:\cygwin\home\username\emacs\site\jde\lisp
      C:\cygwin\home\username\emacs\site\jde\......
      C:\cygwin\home\username\emacs\site\cedet
      C:\cygwin\home\username\emacs\site\cedet\speedbar
      C:\cygwin\home\username\emacs\site\cedet\......
      C:\cygwin\home\username\emacs\site\elib
      ......
  • Assign Environment Variables.
    1. set the user's environment vars. (我的電腦->內容->進階->環境變數->使用者變數->新增)
    2. HOME=C:\cygwin\home\username
    3. PATH=C:\cygwin\bin
  • Setup Emacs.
    1. download minimal .emacs file.
    2. copy it to "C:\cygwin\home\username\emacs\.emacs"
    3. edit the ".emacs" file. and add these lines.
      (custom-set-variables
      '(current-language-environment "Chinese-BIG5")
      '(default-coding-system "chinese-big5")
      '(default-input-method "chinese-b5-tsangchi")
      '(jde-jdk-registry (quote (("1.5.0" . "C:/Program Files/Java/jdk1.6.0_11"))))
      )
      (add-to-list 'load-path (expand-file-name "~/emacs/site/ecb"))
      (require 'ecb-autoloads)
  • Patch and Compile JDEE.
    1. download 02_workaround_for_bytecompiling_efc.
    2. run the setup program of cygwin again. and install the "patch", "make", "emacs", ...... packages.
    3. patch the file: "C:\cygwin\home\ic-mfhsieh\emacs\site\jde\lisp\efc.el"
    4. Run emacs.
    5. execute the emacs command: M-x jde-compile-jde
  • Compile CEDET, elib and ecb.
    1. run cygwin bash shell.
    2. make cedet and elib.
      cd ~/emacs/site/cedet; make
      cd ~/emacs/site/elib; make
    3. run emacs. and execute the emacs command: M-x ecb-byte-compile


沒有留言: