jre升級后遇到的版本不匹配問題
昨天升級了jre更新到update10,遇到版本不匹配的問題:
bad class file: /usr/java/jdk1.5.0_06/jre/lib/rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
這是因?yàn)榫幾g環(huán)境和運(yùn)行環(huán)境的不一致造成的,比如tomcat和jdk1.5配合的時(shí)候,可能就會(huì)出現(xiàn)。解決這個(gè)問題的方法:copy jdk1.5的lib/tools.jar到tomcat的common/lib/tools.jar,覆蓋掉原有文件就可以了。
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
這是因?yàn)榫幾g環(huán)境和運(yùn)行環(huán)境的不一致造成的,比如tomcat和jdk1.5配合的時(shí)候,可能就會(huì)出現(xiàn)。解決這個(gè)問題的方法:copy jdk1.5的lib/tools.jar到tomcat的common/lib/tools.jar,覆蓋掉原有文件就可以了。