Welcome to the JDE Installation Guide. This guide shows you how to install the JDE on Unix platforms (see Unix Installation) and on Windows platforms (see Windows Installation in English or German). See XEmacs Setup for information on configuring XEmacs to run the JDE.
Note If you are new to Emacs, you should read the Init File section in the Customization section of the online Emacs manual before attempting to install the JDE.
The Unix JDE distribution file is a zipped tar file. The easiest way to install the JDE files is to copy the distribution file to the directory where you want the JDE to reside permanently. Then enter
gzip -cd jde-2.1.0.tar.gz | tar xvf -
at the command line. This command will create a JDE subdirectory in the current directory and copy the JDE files and documentation to the newly created directory.
You can download these packages from Eric's web page.
Note Emacs and XEmacs include earlier versions of speedbar that are incompatible with the JDE. You must delete the earlier version or ensure that it is not on the Emacs load path. Otherwise you will get a Lisp error when trying to start Emacs.
You must tell Emacs where the JDE and its required packages live.
You can do this by adding Lisp forms to
your Emacs startup (.emacs
) file that update the Emacs
load-path variable, which lists the paths that Emacs
searches when looking for Lisp packages required by
commands that you execute. The following is an example of
how to do this.
(add-to-list 'load-path (expand-file-name "~/emacs/site/jde-2.2.3/lisp"))
(add-to-list 'load-path (expand-file-name "~/emacs/site/semantic-1.2"))
(add-to-list 'load-path (expand-file-name "~/emacs/site/speedbar-0.11"))
(add-to-list 'load-path (expand-file-name "~/emacs/site/elib"))
To ensure this, add the following line to your .emacs
file:
(require 'jde)
Be sure to add this line after the line that updates the load path (see step 3).
Note See minimal .emacs file for an example of the minimal setup file required to run the JDE with Emacs.
Note You do not have to compile the JDE Lisp files to use the JDE. However, compiling the files can reduce Emacs startup time and speed some operations.
The JDE's lisp directory contains a makefile that compiles the JDE Lisp files. The easiest way to compile the JDE Lisp files is to run the makefile. The makefile assumes that you are using GNU Emacs and that the packages required by the JDE are installed in the same directory as the JDE package itself, i.e., the makefile assumes a directory structure similar to the following:
site jde speedbar semantic elib
If your installation does not fit these assumptions, edit the makefile to reflect your installation.
This section provides instructions for installing a full-featured JDE setup on Windows. This section includes instructions for installing and integrating the following packages:
Note The distribution comes in zipped tar format. Tape archive (tar) format is a Unix file format for storing multiple files in a single file for archiving or transport to other systems. To unpack the Emacs distribution, you will need an unzip utility that can handle zipped tar files. The popular WinZip utility can handle zipped tar files. You can also use Windows versions of the Unix gzip and tar facilities to unzip and untar the Emacs distribution. You can find precompiled versions of the compression and archive utilities at the NT/Emacs site.
For example, I unpacked my copy into d:/emacs
You should find a file named README as a part of the distribution. Be sure to read this file for information on installing Emacs.
Let's assume that the directory in which you have unpacked Emacs is d:\emacs. First, run the program addpm.exe from the Emacs bin directory. The easiest way to do this is to open a Windows Explorer window on the bin directory (for example, d:\emacs\bin) and double-click the addpm.exe entry. Or you can invoke addpm.exe from a Windows command shell by entering, for example, the following lines:
cd d:\emacs\bin
addpm.exe
Invoking addpm.exe creates a set of registry keys that tell Emacs where to find its support files (lisp, info, etc.). It also creates a folder containing an icon linked to runemacs.exe (a wrapper program for invoking Emacs).
Now, to run Emacs, simply click on the icon in the newly created folder or invoke runemacs.exe from a command prompt.
The home directory is the directory where Emacs expects to find your Emacs startup file (see next step). The home directory is also where the bash shell (see Installing the Cygnus Unix Distribution) expects to find the various startup files that it recognizes. Creating a home directory involves two steps. First, create the directory. It can be located anywhere you choose and can have any name. (I follow a pseudo Unix convention on my system by naming my home directory: c:\usr\home.). Then, create a HOME environment variable that points to the home directory.
Note: Creating a home directory is not a prerequisite to installing Emacs. If you do not specify a home directory via a HOME variable, Emacs assumes that your home directory is c:\. However, putting your startup file(s) in a separate directory makes them easier to manage.
The startup file can be named either _emacs or .emacs. If you have both files in your home directory, Emacs will load the .emacs file and ignore _emacs. For more information on startup files, see startup.
Some Emacs users simply dump add-on packages into the Emacs core lisp directory. However, it is better to keep add-on packages in a separate directory to avoid overwriting the add-on packages when you update the core distribution. On my system, the add-on directory is located at c:\usr\home\emacs\site.
You must add the site directory to the Emacs load-path, i.e., the list of directories where Emacs searches for packages that you require. You do this by inserting at the head of your .emacs file Lisp code that prepends the site directory to the load path, e.g.,
(setq load-path (nconc '( "~/emacs/site" ;; Add more directories here: ) load-path))
Note that, following Unix convention, NT/Emacs replaces the tilde (~) character in paths with the path of your home directory.
Set up Emacs to use a browser.
See Specifying a Browser for information on configuring Emacs to use a browser.
Emacs's default text selection mode and cut-and-paste key bindings differ from the CUA standard used by Windows. (Hardly surprising, as Emacs antedates both CUA and Windows). If you prefer the CUA mode (as I do), you can configure Emacs to emulate CUA mode. To do this, first copy the package cua-mode.el into your Emacs site directory (see step 6 above). Then, insert the following code into your .emacs file (see step 5 above).
(pc-selection-mode) (load "cua-mode") (CUA-mode t)
The JDE relies on external tools for compiling, running, and debugging Java programs. The JDE specifically supports the Java Development Kit available at Sun Microsystem's Java products & APIs site. The JDE supports all versions of the JDK.You can use any other command-line development tool compatible with those provided by the JDK. I particularly recommend Jikes, the Java compiler developed by IBM Corp's alphaWorks. Written in C++, Jikes is lightening quick, is compatible with Emacs and the other JDK tools, and is available in Windows as well as Solaris and Linux versions. Jikes can be downloaded from the Jikes home page.
This step is optional. You don't need the Cygnus distribution to run the JDE. However, you may find some of the utilities provided by the distribution useful for developing Java applications, in particular, the ports of the GNU make utility and the bash shell.
Cygnus and Emacs have a Unix heritage and retain some of their Unix characteristics. You can make them feel more at home in a Windows environment by providing a Unix style hierarchy. On my system, the hierarchy resides on my home directory. It has the following structure:
c:\usr
home
emacs
Following Unix tradition, I use the home directory to store my Emacs and bash startup files. (bash is a Unix shell that comes with the Cygwin distribution. I recommend that you use bash in place of the native Windows shell, command or cmd.) My home directory includes a subdirectory named emacs. I use this to store add-on software packages for Emacs that do not come with the NT/Emacs distribution, such as the psgml package and gnuserv.
Note Using a separate directory to store add-on packages simplifies upgrading Emacs.
For example, suppose that you installed Cygwin on your d drive. You should then update the path in your autoexec.bat file (on Windows 95) or Environment variables panel (on Windows/NT) to point to
d:\Cygwin\bin
HOME
environment variable that points to your
home directory (c:\usr\home
). For example, on Windows
95, enter the following in your autoexec.bat
file:
set home=c:/usr/home
Emacs, Cygwin, and other expatriate Unix tools use this variable to find your home directory.
Use any text editor to create the file. Then save it in your home directory under the name .bashrc. The following is my .bashrc file, which I copied from a bash expert and modified slightly. I don't understand it fully, as I am no bash expert myself, and I suspect that some of it does not even apply to a Windows environment. However, it works, and that's good enough for me.
#! /usr/bin/sh
# $Id: .bashrc 1.1 1997/05/22 16:31:48 paulk Exp
paulk $
export PATH=".:${PATH}"
export HOME=/usr/home
export TMOUT=3600
export HISTCONTROL=ignoredups
export FIGNORE='~:.o'
export PS1='//\h/.../\W \$ '
# home key
bind '"\e[1~":beginning-of-line'
# del key
bind '"\e[3~":delete-char'
# end key
bind '"\e[4~":end-of-line'
# pgup key
bind '"\e[5~":history-search-forward'
# pgdn key
bind '"\e[6~":history-search-backward'
alias cp='cp -r'
alias rm='rm -r'
alias ls='ls -F'
alias dir='ls -laF'
alias edit='notepad'
(setq binary-process-input t)
(setq w32-quote-process-args ?\")
(setq shell-file-name "bash") ;; or sh if you rename your bash executable to sh.
(setenv "SHELL" shell-file-name)
(setq explicit-shell-file-name shell-file-name)
(setq explicit-sh-args '("-login" "-i"))
Installing the JDE entails downloading the JDE distribution, unpacking it into a directory on your filesystem, and configuring Emacs to run the JDE. The following details these steps.
The JDE Windows distribution file is a standard Windows zip file that contains the JDE directory and its contents. You can use any Windows unzip program to unzip the JDE.
You can download these packages from Eric's web page.
Note Emacs and XEmacs include earlier versions of speedbar that are incompatible with the JDE. You must delete the earlier version or ensure that it is not on the Emacs load path. Otherwise you will get a Lisp error when trying to start Emacs.
You must tell Emacs where the JDE and its required packages live.
You can do this by adding Lisp forms to
your Emacs startup (.emacs
) file that update the Emacs
load-path variable, which lists the paths that Emacs
searches when looking for Lisp packages required by
commands that you execute. The following is an example of
how to do this.
(add-to-list 'load-path (expand-file-name "~/emacs/site/jde-2.1.9/lisp"))
(add-to-list 'load-path (expand-file-name "~/emacs/site/semantic-1.2"))
(add-to-list 'load-path (expand-file-name "~/emacs/site/speedbar-0.11"))
(add-to-list 'load-path (expand-file-name "~/emacs/site/elib"))
To ensure this,
add the following lines to your .emacs
file:
(require 'jde)
Be sure to add this line after the line that updates the load path (see step 3 above).
Note See minimal .emacs file for an example of the minimal setup file required to run the JDE with Emacs.
Note You do not have to compile the JDE Lisp files to use the JDE. However, compiling the files can reduce Emacs startup time and speed some operations.
The JDE's lisp directory contains a makefile that compiles the JDE Lisp files. The easiest way to compile the JDE Lisp files is to run the makefile. The makefile assumes that you are using GNU Emacs and that the packages required by the JDE are installed in the same directory as the JDE package itself, i.e., the makefile assumes a directory structure similar to the following:
site jde speedbar semantic elib
If your installation does not fit these assumptions, edit the makefile to reflect your installation.
The JDE delegates the task of displaying HTML documents, such as The JDE User's Guide, to browse-url, Emacs' generic interface to HTML browsers. The default browse-url browser in the latest version of NT/Emacs is the Windows default HTML browser. The default browse-url browser on Unix systems is Netscape. You can customize browse-url to use other browsers by executing M-x customize-group browse-url and editing and saving the appropriate configuration variables.
Note The Windows version of browse-url uses the default action associated with the html file type on your system to display a URL (execute C-h f w32-shell-execute for more information). You can thus configure browse-url indirectly by configuring the default Windows action for html files. To do this, select View->Folder Options on the Windows/NT or Windows 95 Explorer menu (note we're talking about the file, not the Internet Explorer). For example, when you install Internet Explorer, the setup program for Internet Explorer defines actions for opening HTML files in an existing window or a new window, respectively. You can set either of these as the default open action, according to your preference.
Note You can configure versions of NT/Emacs earlier than 20.4 to use the default Windows browser. For more information, see shellex and the JDE Troubleshooting Guide). However, you can get the same result with far less effort simply by upgrading to the latest version of NT/Emacs.
The XEmacs distribution includes a version of the JDE (usually not the latest). If you want to use this version, you must select it during XEmacs installation or afterwards, using XEmacs' Manage Packages command.
If you have installed the version of the JDE that came with the XEmacs distribution and it is out of date, which is usually the case, you may want to install the latest version. To install the latest version of the JDE:
This step is crucial. The JDE package includes both Lisp and nonLisp files. XEmacs and the standard JDE distribution have different ideas about where to store these files. The XEmacs installer stores the JDE's lisp files in the xemacs-packages lisp directory and the JDE's non-lisp files in the xemacs-packages etc directory. By contrast, the JDE distribution stores its lisp files and non-lisp files in various subdirectories of the directory where the JDE distribution is unpacked. The JDE decides where to look for its nonLisp files based on whether the XEmacs/xemacs-packages/etc/jde directory exists. If the directory exists, the JDE assumes that it was installed by the XEmacs installer and thus looks for its nonLisp files in the etc/jde directory. If the directory does not exist, the JDE assumes that it was installed manually and thus looks for its nonLisp files in the directory in which it was unpacked. By deleting or renaming the etc/jde directory in the XEmacs hierarchy, you are telling the JDE that it was manually installed.
The debug package includes the gud
package which
is required by the JDE.
Note For help on installing XEmacs packages, choose Options->Manage Packages->Help from the XEmacs menubar.