no.disassemble
no.disassemble copied to clipboard
Fix broken jar path
The leiningen plugin writes /C:/Users/<...>/nodisassemble-0.1.3.jar
into the :jvm-opts
as the path to the jar. This has a leading slash, which triggers the following error:
Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing <...>
If I setup the jvm-opts
manually, without the leading slash, it seems to work.
It sounds like a Windows-specific problem in the plugin. I'll take a look. On Mar 20, 2016 2:41 PM, "Viktor Magyari" [email protected] wrote:
The leiningen plugin writes /C:/Users/<...>/nodisassemble-0.1.3.jar into the :jvm-opts as the path to the jar. This has a leading slash, which triggers the following error:
Error occurred during initialization of VM agent library failed to init: instrument Error opening zip file or JAR manifest missing <...>
If I setup the jvm-opts manually, without the leading slash, it seems to work.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/gtrak/no.disassemble/issues/14
I've just run this on Windows (Win 10, Java 1.8.0_72, Clojure 1.8) and am getting the same behavior and result that nodisassemble is not usable on this platform for me.
I just experimented with this change to lein-nodisassemble.plugin and it worked to get the plugin working on Windows.
(defn middleware [project]
(let [version (get-version project)
project (update-in project [:dependencies] conj ['nodisassemble version])
path (-> (find-dep project) .getAbsolutePath)]
(update-in project [:jvm-opts] conj (str "-javaagent:\"" path "\""))))
The changes are in using .getAbsolutePath and also quoting the path when assembling the javaagent string. I have not tested on other platforms, however.