My first lecture of the term was today at 9am: Operating Systems II. Paul Paulson, OSU instructor, detailed what I have known for a few months: this class will now use the Linux Kernel and simulate a class size open source community. The required text is “Linux Kernel Development” by Robert Love (a book I recently read and enjoyed) and halfway through the term a special lecture by Greg KH is scheduled! It should be a great course.
Yearly Archives: 2006
Java Without the IDE?

Today I stayed home but wanted to do some work on the Registry. However, I don’t have a workstation at home with the specs to run IntelliJ with any reasonable speed. Furthermore, I was hoping that dumping the ultra slick IDE will help me learn a bit more about the Java environment.
Eclipse Integration in Vim (Eclim) was the first promising lead I found. However, I had a tough time getting the Registry to run properly under Eclipse and Eclipse is as resource hungry to run as IntelliJ.
I couldn’t turn up any other good Vim tools so I started searching for Emacs tools. Although I am not a huge fan of Emacs I was very impressed with the SLIME environment when I did my towers of hanoi assignment in LISP. And it turned out a very slick Java environment for Emacs is available tool
A quick search for emacs java lead me to the Java Development Environment for Emacs (JDE) which offered a reasonable level of integration including:
- Debugger Integration
- Syntax Higlighting
- Ant Integration
- Code Templates
However, it was a beast to configure. My primary problem was that the Debian jde packages in unstable are broken. After uninstalling this package and doing a manual install I had JDE running like a champ.
The next task was to write a prj.el that would contain all of the information for JDE including: source location, classpath, default file headers, and build configuration. With some help from an example prj.el I wrote one for use with the Registry (here). Although, this file looks daunting the IntelliJ project files are unreadable by comparison.
This screenshot shows Emacs and JDE after an unsuccesful compile of the Registry. Clicking on the ant error loaded the proper file making it quite clear that I had an unfinished line.
Another standard IDE feature that JDE supports is method completion using the compact keystroke [sic] C-c C-v C-.. This brings up a dialog that lists all methods that can be called on this object.
After some digging it turns out debugging the application while it is running in Tomcat is a straightforward affair also. After deploying the application into the $TOMCAT_HOME/webapps directory running $TOMCAT_HOME/bin/catalina.sh jpda start starts Tomcat with remote debugging via JPDA on port 8000. Because the prj.el I wrote has this port set in jde-db-option-connect-socket using the menu Jdb->External Process->Attach via socket enables the debugger. Using this mode common debugging tools such as breakpoints and variable inspection are available.
Overall I am very impressed and excited to start using JDE. Only one thing is holding me up: JSP debugging. Anyone have a solution?
World Famous
Alex, Mike and I were featured on the front page of the Daily Barometer today for the Google Pizza Ambassador program and the Linux Users Group. Go Beavs! Update: Photos here and here.
