Installing JDEE

This is a guide that not only tries to explain the process to compile JDEE, but also how to install it (separate step if you download the binaries).

Dependencies

There are Emacs Lisp runtime dependencies you have to install before you can use JDEE. In addition, there are compile time dependencies.

Compile Time Dependencies

To build the JDEE, you have to first install the Ant. If you just want to use JDEE and not build the code from source, you can skip this step.

Download Ant 1.7 and the contrib library from here. Follow the instructions to installing both.

In place ant installation documents here would be nice

Run time Dependencies

Download CEDET here. Follow the instructions to installing the library. Note that you'll refer to this path in the configuration stage.

Installing from Binaries

After downloading the install binaries, either unzip or untar/gzip the files on your file system:
gzip -cd jde-version-tar.gz
Skip right to the Emacs configuration step.

Compiling JDEE

Even though Ant is used to build and install JDEE, the build uses old automake/make conventions. Building the source is a two step process:
  1. First, get a feel for what the build does and doesn't do by printing the targets:
    ant -p
    
    You don't need to specify the build.xml as you should be in the root source directory, which contains the build file. Most of the targets that are important are given here. The utility targets aren't documented and don't show in this output.
  2. First configure the project, which is much like ./configure --prefix=.... In this step, the file build.properties is generated and is analogous to config.h, which is the settings to use for the build. This file is never added to subversion and it contains very specific per build settings. The intention is to make modifications to this file so you don't have to modify build.xml.
    1. Before creating the file, if you are developer or will be building and updating from trunk often, you can create a ~/.jdee-config.properties file, which is used to create the initial properties in build.properties.

      Note: Ant looks for the file in the user.home property, which under windows (i.e. XP), is in:

      C:/Documents and Settings/user name/.jdee-config.properties
      

    2. To create the build.properties file, invoke:
      ant configure
      
      After running this, the file is generated and looks something like:
      #user editable build configuration parameters
      #Wed Aug 05 23:18:22 CDT 2009
      cedet.dir=/usr/local/share/emacs/cedet
      elib.dir=/usr/local/share/emacs/elib
      build.bin.emacs=/Users/landes/Applications/Emacs.app/Contents/MacOS/Emacs
      config.time=2009/08/05 23\:18
      prefix.dir=/usr/local/jdee
      
    3. Once the build.properties is created, edit it if you didn't create a ~/.jdee-config.properties. When editing this or the ~/.jdee-config.properties file, refer to Project Build Configuration for more information on the properties themselves.
  3. If you create the ~/.jdee-config.properties file, you might want to do a complete clean (cleans all derived objects and the build.properties), then regenerate by using the configure target once more:
    ant clean-all
    edit ~/.jdee-config.properties
    ant configure
    cat build.properties
    

    Note: The clean target doesn't remove the (generated) build.properties file.

    Spending just a little time on this step could really save a lot of time during the build step.

  4. Once you get the configuration set, build the project with:
    ant build
    
    This step compiles the both the Java and Emacs Lisp code. It also does a few other steps of generating autoload files etc.
  5. To create the distribution:

    ant dist
    
    This has everything with which the binaries are released. If you are developer, you might want to set your load-path Emacs variable to load JDEE from dist/lisp so you can develop, build, test quickly.

  6. To install the distribution to a directory of your choosing (the prefix.dir property).
    ant install
    

Emacs Configuration

Once the dependencies and JDEE is installed, add the libraries to your ~/.emacs file:
(add-to-list 'load-path "path to cedet's lisp directory here")
(add-to-list 'load-path "path to JDEE's lisp directory here")

;; load autoloads file
(load "jde-autoload")

Project Build Configuration

The properties in ~/.jdee-config.properties and build.properties mean:
Paul Landes