OK, thanks for the quick response!
 
This is very helpful. I can try this.

However, I have one question. When you say, "connect via jpda," do you
mean
that I should follow the instructions for the 1.2.2 jdk (maybe download
jpda.jar) and set these variables within emacs:

jde-bug-vm-includes-jpda-p Off.
jde-bug-jpda-directory Directory that contains the JPDA package.
(and set a path to the jpda dir in my .bashrc)

instead of these ones (in the instructions for jdk1.3)?:

jde-bug-vm-includes-jpda-p On.
jde-bug-jdk-directory Directory that contains the Java SDK 1.3. Suppose
that the SDK is installed in the directory d:\jdk-1.3 on your system.
Then you would set jde-bug-jdk-directory to d:\jdk-1.3.

Also, I forgot to post it before, but here is my .emacs file:

;; This .emacs file illustrates the minimul setup
;; required to run the JDE.

;; Set the debug option to enable a backtrace when a
;; problem occurs.
(setq debug-on-error t)

;; Update the Emacs load-path to include the path to
;; the JDE and its require packages. This code assumes
;; that you have installed the packages in the emacs/site
;; subdirectory of your home directory.
(add-to-list 'load-path (expand-file-name
"/var/local/jdee/jde-2.2.8/lisp"))
(add-to-list 'load-path (expand-file-name "/var/local/jdee/semantic"))
(add-to-list 'load-path (expand-file-name "/var/local/jdee/speedbar"))
(autoload 'speedbar-frame-mode "speedbar" "Popup a speedbar frame" t)
(autoload 'speedbar-get-focus "speedbar" "Jump to speedbar frame" t)
(global-set-key [(f4)] 'speedbar-get-focus)
(add-to-list 'load-path (expand-file-name "/var/local/jdee/eieio"))
(add-to-list 'load-path (expand-file-name "/var/local/jdee/elib-1.0"))


;; If you want Emacs to defer loading the JDE until you open a 
;; Java file, edit the following line
(setq defer-loading-jde nil)
;; to read:
;;
;;  (setq defer-loading-jde t)
;;

(if defer-loading-jde
    (progn
      (autoload 'jde-mode "jde" "JDE mode." t)
      (setq auto-mode-alist
            (append
             '(("\\.java\\'" . jde-mode))
             auto-mode-alist)))
  (require 'jde))


;; Sets the basic indentation for Java source files
;; to two spaces.
(defun my-jde-mode-hook ()
  (setq c-basic-offset 2))

(add-hook 'jde-mode-hook 'my-jde-mode-hook)

;; Include the following only if you want to run
;; bash as your shell.

;; Setup Emacs to run bash as its primary shell.
(setq shell-file-name "bash")
(setq shell-command-switch "-c")
(setq explicit-shell-file-name shell-file-name)
(setenv "SHELL" shell-file-name)
(setq explicit-sh-args '("-login" "-i"))
(if (boundp 'w32-quote-process-args)
  (setq w32-quote-process-args ?\")) ;; Include only for MS Windows.

; (setq display-time-24hr-format t)       ;european style time

;;; global set up keys
(global-set-key "\C-x\C-g" 'goto-line)
(global-set-key "\C-x\C-b" 'electric-buffer-list)
(global-set-key "\C-xl" 'what-line)
(global-set-key "\C-c\C-o" 'compile)
(global-set-key "\M-c" 'compile)
(global-set-key "\M-n" 'next-error)
(global-set-key "\M-e" 'next-error)
(setq compile-command "javac ")

;;; ~/ hack
; (set-buffer (get-buffer-create "*scratch*"))
; (setq default-directory "~/")


(put 'downcase-region 'disabled nil)


(require 'paren)

;; By an unknown contributor

(global-set-key "%" 'match-paren)

(defun match-paren (arg)
  "Go to the matching parenthesis if on parenthesis otherwise insert %."
  (interactive "p")
  (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
  ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
  (t (self-insert-command (or arg 1)))))


(custom-set-variables
 '(jde-bug-jdk-directory "/var/local/https-1.0/java/jdk1.3.1_01")
 '(jde-db-debugger (quote ("JDEbug" "" . "Executable")))
 '(jde-bug-vm-includes-jpda-p t)
 '(jde-run-classic-mode-vm t))
(custom-set-faces)

-------------------

I appreciate any of the assistance I can get! 

Best,

Heather Buch





"Kevin A. Burton" wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Paul Kinnucan <[EMAIL PROTECTED]> writes:
> 
> > Heather Marie Buch writes:
> >  > Hi Paul,
> >  >
> >
> > Heather,
> >
> > I haven't done any servelet development and I don't have access
> > to Linux so I'm afraid I can't be of much help myself. However,
> > there are JDE users who have used JDEbug successfully to debug
> > Tomcat applications. Therefore I am reposting your mail to the
> > JDE mailing list in the hopes that someone on it has the answers
> > you need. Regarding the eieio error, that is simply a side effect
> > of JDEbug's failing to connect to Tomcat. I need to fix
> > the code to give a more meaningful response.
> <snip/>
> 
> Your best bet is to startup Tomcat in a second process outside of Emacs and
> connect via JPDA.  I would recommend starting Tomcat via Ant...
> 
> <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
> 
>     <jvmarg value="-Dcatalina.home=."/>
> 
>     <jvmarg value="-Xrunjdwp:transport=dt_socket,address=2112,server=y,suspend=n"/>
>     <jvmarg value="-Xdebug"/>
>     <jvmarg value="-Xnoagent"/>
>     <jvmarg value="-Djava.compiler=NONE"/>
> 
>     <arg value="start"/>
> 
>     <classpath refid="project.classpath"/>
> 
> </java>
> 
> Either way... you need to setup Tomcat with the following Java parameters:
> 
> - -Xrunjdwp:transport=dt_socket,address=2112,server=y,suspend=n
> - -Xdebug
> - -Xnoagent
> - -Djava.compiler=NONE
> 
> Then you can connect to Tomcat and it should set your breakpoints.
> 
> You can then use your browser to goto the servlet.  At this point you can
> change back to Emacs an the JDE should be stopped on your breakpoint.
> 
> .... and yes... this was on Linux (Debian GNU/Linux actually :)
> 
> Kevin
> 
> - --
> Kevin A. Burton ( [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] )
>              Location - San Francisco, CA, Cell - 415.595.9965
>         Jabber - [EMAIL PROTECTED],  Web - http://relativity.yi.org/
> 
> Yes I know my enemies, they're the teachers who taught me to fight me;
> compromise, conformity, assimilation, submission, ignorance, hypocrisy,
> brutality, The Elite. All of which are American Dreams.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt
> 
> iD8DBQE8UkjKAwM6xb2dfE0RAldKAJ9jBfGEHI41WIej7ieDeYGP9TGcmwCdFFXD
> 93rmms1VVXTb7hKw7Af/F6o=
> =1xO9
> -----END PGP SIGNATURE-----

-- 
http://www.mit.edu/~hmbuch/

Heather Marie Buch  [EMAIL PROTECTED]

Reply via email to