我看了帖子:閱讀JAR文件的內容(在運行時)?
Viewing contents of a .jar file
和
How do I list the files inside a JAR file?
但我很遺憾,沒有找到很好的解決實際閱讀一個JAR的內容(由檔案文件)。
此外,有人可以給我一個提示,或指向一個資源,我的問題在哪裏討論?
我能想到的一個不那麼直接的路要做到這一點:
我可以一個JAR的資源列表某種程度上轉換成的 內-JAR的URL列表,然後我可能使用openConnection()打開。
http://stackoverflow.com/questions/749533 http://stackoverflow.com/questions/435890 http://stackoverflow.com/questions/251336/is-something-similar-to-serviceloader- in-java-1-5 http://stackoverflow.com/questions/1429172/list-files-inside-a-jar http://stackoverflow.com/questions/205573/java-at-runtime-find-all- class-in-app-that-extend-a-base-class http://stackoverflow.com/questions/347248/how-can-i-get-a-list-of-all-the-implementations-of-an -interface-programmatically http://stackoverflow.com/questions/1456930/read-all-classes-from-java-package-in-classpath – erickson