是什么的.class和.dex文件之间的区别? [英] What is the difference between .class and .dex files?

查看:235
本文介绍了是什么的.class和.dex文件之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当然, .dex 文件是Android和的.class 文件的Dalvik虚拟机都为JVM 。但我不知道他们是否有类似的布局(常量池,字段,方法,属性,...)?字节code是不同的,但是否有具体的Dalvik的运算code当量从JVM的人?

Of course, .dex files are for the Dalvik VM of Android and .class files are for the JVM. But I wonder if they have similar layouts (Constant Pool, Fields, Methods, Attributes, ...)? The bytecode is different, but are there Dalvik specific opcode equivalents to the ones from the JVM?

推荐答案

而一个Java的jar文件有很多类文件,每个APK文件只有一个
classes.dex文件,如下所示。据谷歌的APK格式
不同于对性能和安全性的类文件格式。

Whereas a Java jar file has many class files, each APK file has only a single classes.dex file, as shown below. According to Google, the APK format differs from the class-file format for performance and security reasons.

这篇关于是什么的.class和.dex文件之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆