Created
November 25, 2018 12:48
-
-
Save codecitizen/aa0d46bd918ac1a107aecc8eccdac056 to your computer and use it in GitHub Desktop.
How to list all classes from JAR file in Clojure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns list-classes-from-jar | |
(:import (java.util.jar JarFile))) | |
(def jar-file (JarFile. "target/s3-file-upload-sls-1.0.0-SNAPSHOT-standalone.jar")) | |
(def entries (.entries jar-file)) | |
(while (.hasMoreElements entries) | |
(let [entry (.nextElement entries)] | |
(println (.getName entry)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment