all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "jdijkmeijer" <jdijkmei@xs4all.nl>
Subject: automatically decompiling a class file from jar.
Date: Sat, 4 Oct 2003 12:41:03 +0200	[thread overview]
Message-ID: <3f7ea2bb$0$58703$e4fe514c@news.xs4all.nl> (raw)

Hi I thought it would be nice to automatically decompile a class file when
opening it from a jar. I already found decompile.el and that works fine on
class files loaded from a directory.
It's been a while since I wrote my last lisp program, and anyway I have
never been a real Lisp programmer but...
Looking into decompile.el I found an add-hook

    ;; a hook to be able to automatically decompile-find-file .class files
    (add-hook
     'find-file-hooks
     (lambda ()
       (let ((file (buffer-file-name)))
         (cond ((and file (string= (substring file -6) ".class"))
                (progn (jdc-buffer) (jde-mode)))))))

Which i deducted to be responsible for running the jad command on the file
to be opened. Now I wonder how difficult (or easy) is it to provide a hook
for opening a class file from a jar?
Going further into this, dreaming of some more really kewl emacs features It
would be really, really, really nice if you than could make changes to this
decompiled java file, compile it and place it back updated and compiled in
the jar file.
Of course classpath issues are lurking round the corner but...
Anyway lets stop dreaming, and back to some coding (yes on a Saturday
afternoon).
kind regards.
Jeroen.

             reply	other threads:[~2003-10-04 10:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-04 10:41 jdijkmeijer [this message]
2003-10-06 17:31 ` automatically decompiling a class file from jar Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='3f7ea2bb$0$58703$e4fe514c@news.xs4all.nl' \
    --to=jdijkmei@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.