You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can install & configure this module on Windows, but opening Java .class files will raise a runtime error about missing program 'file'. This occurs because find is Mac/Linux specific & doesn't exist on Windows, but the jdecomp--jar-p implementation assumes it's an inbuilt program.
This is the current jdecomp--jar-p source:
(defunjdecomp--jar-p (file)
"Return t if FILE is a JAR."
(ignore-errors
(let ((type-output (with-output-to-string
(process-file"file"nil standard-output nil"-bL""--mime-type"
(expand-file-name file)))))
(member (string-trim type-output) jdecomp--jar-mime-types))))
On Emacs 24+, we can override this implementation with a simple file-exists-p on Windows. This is the configuration from my user.el:
Then jdecomp works automatically as expected when opening .class files.
(Appreciate the library -- saved me from installing Eclipse 🙂)
EDIT: The above code snippet only works if you manually EVAL it after init. It'll then work as long as your Emacs stays launched. It's probably possible to fix this by including the advice-add in a post-init hook, but I haven't done this yet.
The text was updated successfully, but these errors were encountered:
You can install & configure this module on Windows, but opening Java .class files will raise a runtime error about
missing program 'file'
. This occurs becausefind
is Mac/Linux specific & doesn't exist on Windows, but the jdecomp--jar-p implementation assumes it's an inbuilt program.This is the current jdecomp--jar-p source:
On Emacs 24+, we can override this implementation with a simple
file-exists-p
on Windows. This is the configuration from my user.el:Then
jdecomp
works automatically as expected when opening .class files.(Appreciate the library -- saved me from installing Eclipse 🙂)
EDIT: The above code snippet only works if you manually EVAL it after init. It'll then work as long as your Emacs stays launched. It's probably possible to fix this by including the advice-add in a post-init hook, but I haven't done this yet.
The text was updated successfully, but these errors were encountered: