简体   繁体   English

如何检查 class 文件版本 50.0 (Java 6) 是否已经过预验证?

[英]How to check if a class file version 50.0 (Java 6) has been preverified?

I "upgraded" some jar files from class file version 49.0 to 50.0 with ProGuard.我使用 ProGuard 将一些 jar 文件从 class 文件版本 49.0“升级”到 50.0。

Because preverification is optional with version 50.0, I wonder if there is a way to check if the class file has really an StackMapTable attribute in it.因为预验证在 50.0 版本中是可选的,所以我想知道是否有办法检查 class 文件中是否真的有 StackMapTable 属性。

(It's not that I don't trust ProGuard "[...] The following options upgrade class files to Java 6, by updating their internal version numbers and preverifying them." but I'd like to learn how to verify the existance of the StackMapTable.) (并不是说我不信任 ProGuard “[...] 以下选项将 class 文件升级到 Java 6,通过更新它们的内部版本号并预先验证它们。”但我想了解如何验证堆栈映射表。)

Javaasist has support for reviewing stack map tables. Javaasist支持查看堆栈 map 表。

The one other nugget I came across was java -XX:-FailOverToOldVerifier -Xverify:all which should only verify if there is SMT information in a 50+ version class file.我遇到的另一个金块是 java -XX:-FailOverToOldVerifier -Xverify:all 应该只验证 50+ 版本 class 文件中是否有 SMT 信息。 However, I haven't tried that and cant even tell you what it might look like on output.但是,我还没有尝试过,甚至不能告诉你它在 output 上会是什么样子。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Java Card Converter:版本50.0不受支持的类文件格式 - Java Card Converter: unsupported class file format of version 50.0 Class 文件版本错误 52.0,应该是 50.0 - Class file has wrong version 52.0, should be 50.0 Xamarin升级导致“类文件有错误版本52.0,应该是50.0”错误 - Xamarin upgrade causes “class file has wrong version 52.0, should be 50.0” error 错误:错误的类文件…com / smartfofserver / openspace / OpenSpaceExtension.class…类文件的版本为50.0,应为49.0 - error: bad class file…com/smartfofserver/openspace/OpenSpaceExtension.class … class file has wrong version 50.0, it should be 49.0 UnsupportedClassVersionError: 已由较新版本的 Java Runtime(类文件版本 55.0)编译,此版本 (..) 高达 52.0 - UnsupportedClassVersionError: has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version (..)up to 52.0 Class 已由更新版本的 Java 环境(类文件版本 52.0)编译。 - Class has been compiled by a more recent version of the Java Environment (class file version 52.0.)' 如何使用Scala(50.0 / 51.0)发出更新的类文件版本? - How to emit newer class file versions with Scala (50.0/51.0)? 已由较新版本的 Java 运行时编译(类文件版本 57.0) - Has been compiled by a more recent version of the Java Runtime (class file version 57.0) org/testng/ITestListener 已由更新版本的 Java 运行时(类文件版本 55.0)编译,最多只能识别 52 版本 - org/testng/ITestListener has been compiled by a more recent version of the Java Runtime (class file version 55.0), only recognizes version up to 52 如何检查java中的会话已经过期? - how to check session has been expired in java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM