Emacs 21 and JDE (JDEE) Installation in Debian Etch

To install JDE or JDEE or Java IDE for Emacs, it is easier to do it through Synaptic package manager than to manually install the package by following instructions on the JDEE web site (http://jdee.sunsite.dk/). However, we need to add an additional source URL to the sources.list file in the /etc/apt directory. So, follow the steps below. (I assume that emacs is already installed in the Debian system using Synaptic package manager).
1) I google using the keyword, “jdee+Debian Etch”. There will be a handful of matched link results. So, I click on “Debian–Details of package jde in etch”.

2) After clicking on the link result above, it takes me to http://packages.debian.org/etch/jde.

3) Next, I scroll down to the bottom of the page and click on “all” under the “Download jde”.

4) We will see a list of source URLs that we can use for Synaptic package manager source list. I select “mirrors.kernel.org/debian” as my source URL.

5) I open a terminal and switch to root.

>su

root password

6) I edit the sources.list in the /etc/apt file using vi.

>cd /etc/apt

>vi sources.list

7) I add the following line to the end of the sources.list file

deb http://mirrors.kernel.org/debian etch main contrib

8) I save sources.list file and open Synaptic package manager. Then, I use the search facility in the Synaptic to search for “jde”. If there is nothing wrong, “jde” will be shown on the search result.

9) Click Apply and Ok to install it. That’s all.

10) To use the just-installed JDE in Emacs, open emacs.

>emacs &

11) Open any Java file. Then, there will be a “JDE” command on the File Menu.

Problems:

Well, I still cannot use JDE to compile java programs. I keep getting an error message, “JDE does not recognize JDK 1.6”. I think that this version of JDE does not support JDK 1.6 or it’s because I use 64 bit version of JDK. I will try to install JDK 1.5 later.

[Update: September 27, 2007] I install JDK 1.5.0_12 64-bit amd version in Debian Etch. The installed directory is /opt/jdk1.5.0_12. Then, I open a java file in emacs21. Next, I register the newly installed jdk in emacs as follows.

In emacs, press M-x

Then, enter customize-variable after the M-x. So, at the shell command of emacs, we will have something like:

M-x customize-variable

Next, we will get:

Customize variable:

Enter jde-jdk-registry after the colon like this.

Customize variable: jde-jdk-registry

The emacs will take us to its jdk configuration page. Look for “Jde Jdk Registry”, and click INS or insert.

Enter the jdk name such as: jdk1.5.0_02

Enter the jdk home path: /opt/jdk1.5.0_12

Then, click “Save for future session” and “Save”.

Now, try to compile a java file.

In Debian Etch, we may get the following error when compiling a java file.

bsh: Specified BeanShell jar filed does not exist:
/usr/share/emacs21/site-lisp/java/lib/bsh.jar

The solution is to make a symbolic link from the /usr/share/java to /usr/share/emacs21/site-lisp.

cd /usr/share/emacs21/site-lisp
mkdir java
cd java
ln -s /usr/share/java lib

Then, try to recompile the java source file again. It should be fine now.

The solution for bsh.jar error message is excerpted from http://kanis.cc/en/blog-2004-06.html

Advertisements
This entry was posted in Java, Linux. Bookmark the permalink.

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