* Java decompilation on-the-fly, when opening .class file
@ 2003-10-28 23:45 Joao
2003-10-29 0:57 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: Joao @ 2003-10-28 23:45 UTC (permalink / raw)
Hi all,
Has anyone set up a hook in emacs to call 'jad' or some other
Java decompiler when you visit a .class file ? I guess this should
be feasible, but my emacs-lisp skills are not up to this yet.
I would appreciate it if someone could share the code to do this.
I'm running emacs on Windows 2000 (not sure it matters).
Thanks,
Joao
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Java decompilation on-the-fly, when opening .class file
2003-10-28 23:45 Java decompilation on-the-fly, when opening .class file Joao
@ 2003-10-29 0:57 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2003-10-29 0:57 UTC (permalink / raw)
Joao wrote:
> Has anyone set up a hook in emacs to call 'jad' or some other
> Java decompiler when you visit a .class file ? I guess this should
> be feasible, but my emacs-lisp skills are not up to this yet.
>
> I would appreciate it if someone could share the code to do this.
> I'm running emacs on Windows 2000 (not sure it matters).
I'd be surprised if the JDEE doesn't already provide a feature like that:
http://jdee.sunsite.dk/
But if it doesn't, how about something as simple as this:
(defvar class-file-decompile-command "jad -classpath ${CLASSPATH:-.}"
"The shell command run by `decompile-class-file'.")
(defun decompile-class-file (&optional file)
"Run `class-file-decompile-command' on FILE, but only if it's a .class file.
If FILE is nil, run it on `buffer-file-name'."
(interactive "fFile: ")
(or file (setq file buffer-file-name))
(and (equal (file-name-extension file) "class")
(shell-command (concat class-file-decompile-command " " file))))
(add-hook 'find-file-hooks 'decompile-class-file)
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-29 0:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-28 23:45 Java decompilation on-the-fly, when opening .class file Joao
2003-10-29 0:57 ` Kevin Rodgers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).