2016-05-12 45 views
0

Fast-ClassPath-Scanner https://github.com/lukehutch/fast-classpath-scanner使用最新版本。 上執行(獲得所有類的名字在戰爭中,其中包括所有的罐子和類)Fast-ClassPath-Scanner不適用於Java 6運行時?

new FastClasspathScanner(basePackage).scan().getNamesOfAllClasses() 

越來越:

unsupportedclassversion誤差與JRE 6

請提供一個解決的辦法或替代執行相同的操作。當您嘗試加載它在失敗與UnsupportedClassVersionError 1.6(JRE6)環境

回答

0

FastClasspathScanner被編譯爲Java 1.7

。此錯誤表明類版本(此處爲1.7)與JVM版本(此處爲1.6)不兼容。

Java 7不向後兼容Java 6.您可以嘗試自己構建FastClasspathScanner庫unter 1.6(不知道這是否可能)。或者將您的項目升級到Java 7.

0

正確,我是FastClasspathScanner的作者,而且它不是使用JRE6工作的目標。但是,支持1.6的補丁是受歡迎的。

+0

嗨!任何提示有關[耦合](http://stackoverflow.com/questions/43097780/how-to-show-class-dependencies-with-fast-classpath-scanner)? –

相關問題