Emacs/JDK/JDE
Installation Tutorial
Step 1 - Downloading The
Software
- Make a directory called java
on your C:\ drive (i.e., c:\java)
- Click the following links
to download the files they name to a temporary location
such as your desktop (be sure to remember where you put
them on your machine):
Step 2 - Installing Emacs-20.4
- Double click on the Emacs-20.4.zip
file on your machine, which should launch a zip utility
such as WinZip, to extract the files into c:\java
as follows. Winzip will probably ask you to
agree to a license thing - just say I Agree. You
will see one of two things:
- A Winzip Wizard
screen that will help you with the extraction or
- A Winzip Classic
screen giving you a list of the files in the zip
file.
It doesn't matter which
screen you have but eventually you want the Winzip
Classic screen. So if you have the Wizard screen, just
click the button labeled Winzip Classic the lower
left hand corner. If you already have the Winzip Classic
in screen up then you are okay.
- Extract the files. Go to
ACTIONS - EXTRACT... and choose that. Winzip will ask you
where to extract the files to. In that white box, you
want to type c:\java. Make sure you do this
correctly! This process will take several seconds. When
it's completed, you will see a green light turn on in the
lower right-hand corner of the screen. When it turns
green, it has completed. You can now close Winzip.
Step 3 - Installing JDK
1.2.2_006
- Double-click the jdk-1_2_2_006-win.exe
file on your machine to start its installation process.
- It will ask you a series
of questions throughout the installation - just take all
defaults and click Next whenever possible.
- The JDK program will be
installed in c:\jdk1.2.2, not c:\java.
Step 4 - Unzipping JDE and
The Important Emacs File
- Double-click the emacs_and_jde.zip
file on your machine to unzip the last set of files into c:\java,
as in step 2.
- Check to make sure you
have the following files in c:\java:
- 5 Folders: bin,
etc, info, jde-2.1.5,
and lisp
- 6 Files: Bugs,
Emacs, Getting
Started, java.emacs, Readme,
and Readme32
- Go to c:\java\bin
and double-click on the file addpm.exe. A prompt
will appear asking you to install Emacs. Click OK.
- A window will appear but
you can just close it.
Step 5 - Setting Your CLASSPATH
- Bring up Emacs by clicking on
the shortcut labeled Emacs
in c:\java. (Do not use emacs.exe
in c:\java\bin because that
won't load the JDE library.)
- You won't see JDE on
the Emacs menu bar right away. You must be editing a .java
file in order for that menu to appear. Select Save buffer
as from the File menu and then type in a filename
ending with .java and the JDE menu will
appear.
- Select JDE->options->compile. A customization buffer will
come up. The second option is the compile CLASSPATH. Click on
SHOW next to it, and then INS. In the little window that appears
type a period, like this:
.
The period means the current directory and, by having it in your
classpath, the compiler will be able to locate files like the
Keyboard.java file that will be stored in the same
directory as your program file.
-
Then click on state and select save
for future sessions.
-
Now you
need to do the same thing for JDE->options->run (adding
. to the
run CLASSPATH.)
That's it! To bring up Emacs in the future, be sure to use the
shortcut labeled Emacs in c:\java.
For more information about Emacs, here's an
Emacs
Reference Card that is best printed back-to-back.
The JDE menu is
self-explanatory for compiling and executing Java programs, while
other menus include other essential editing functions. There are,
however, a few useful commands that do not show up on the menus
or on most quick reference cards:
C-x
` (that's control-backquote key) after
compilation that results in one or more errors takes you
to the line in your program pointed to by the first error
message. If you have multiple errors, repeating C-x `
moves through them all.
C- c g prompts for a line number and goes to it.
C-c i properly indents the current region of code.
This is a good way to check if you have a missing brace
or an extra brace.
M-/ (press
ESC and then /) is context-sensitive completion. It does a
darned good job at finishing the word you've started typing, given the
other words in the file. For example, if you've typed
System once in a buffer, you can just type
Sy and then M-/ and it will finish it for you! If Emacs guesses
wrong, hit M-/ again for its second best guess.
Originally written by Michael Hunsaker. Modified by Suzanne Menzelmenzel@indiana.edu