clojure-goes-fast / clj-java-decompiler

REPL-integrated Clojure-to-Java decompiler
Eclipse Public License 1.0
266 stars 8 forks source link

Does not work with Java 11 #5

Closed hindol closed 4 years ago

hindol commented 5 years ago
nREPL server started on port 64032 on host 127.0.0.1 - nrepl://127.0.0.1:64032
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 11.0.2+9-Ubuntu-3ubuntu118.04.3
        Exit: Control+D or (exit) or (quit)
    Commands: (user/help)
        Docs: (doc function-name-here)
              (find-doc "part-of-name-here")
Find by Name: (find-name "part-of-name-here")
      Source: (source function-name-here)
     Javadoc: (javadoc java-object-or-class-here)
    Examples from clojuredocs.org: [clojuredocs or cdoc]
              (user/clojuredocs name-here)
              (user/clojuredocs "ns-here" "name-here")
boot.user=> (require '[clj-java-decompiler.core :refer [decompile]])
nil
boot.user=> (decompile (fn [] (println "Hello, decompiler!")))
java.lang.ClassNotFoundException: sun.misc.URLClassPath
  java.lang.NoClassDefFoundError: sun/misc/URLClassPath
hindol commented 5 years ago

Apparently sun.* classes are removed from Java 9+. More info: https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-7744EF96-5899-4FB2-B34E-86D49B2E89B6

hindol commented 5 years ago

Workaround for now is to forcefully use the latest version of procyon,

(set-env!
 :resource-paths #{"src"}
 :dependencies   '[[org.clojure/clojure "1.10.0"]
                   [org.bitbucket.mstrobel/procyon-core "0.5.35"]
                   [org.bitbucket.mstrobel/procyon-compilertools "0.5.35"]
                   [com.clojure-goes-fast/clj-java-decompiler "0.2.1"
                    :exclusions [org.bitbucket.mstrobel/procyon-core
                                 org.bitbucket.mstrobel/procyon-compilertools]]])
alexander-yakushev commented 5 years ago

Hi, the fix is available in 0.3.0-SNAPSHOT. For details, please see #4.

hindol commented 5 years ago

Cool. I missed that. Feel free to close this.

dharrigan commented 4 years ago

Hi,

Please can 0.3.0 be released as it's been nearly 1 year now since the PR and more of us are using Java 11 as the default JVM :-) Thank you!

-=david=-

alexander-yakushev commented 4 years ago

You are right, long overdue:). Published as 0.3.0.

dharrigan commented 4 years ago

w00t! Thank you :-)