问题描述
我想知道是否创建存档(通过运行 java -Xshare:dump
)将字节代码编译为本机代码。
I'm trying to know whether creating a Class Data Sharing archive (by running java -Xshare:dump
) compiles byte code into native code.
关于类数据共享的内部结构,没有很多文档。我链接的页面说 java -Xshare:dump
There is not a lot of documentation about the internals of Class Data Sharing. The page I linked says that java -Xshare:dump
但是没有说明此代码编译与否。
But says nothing about whether this code is compiled or not.
(可能相关:)
推荐答案
在这两种情况下,它都是缓存中的本机代码(请参阅您提供的有关在不同体系结构的机器上重新生成缓存的链接中的讨论)。 IBM JVM为集群提供了更多选项和更好的布局,但Oracle也可以使用它。
In both cases it's native code in the cache (see the discussion in the link you provided about regenerating the cache on machines of different architecture). The IBM JVM takes it further with more options and a nicer layout for clusters, but the Oracle one works too.
这篇关于Java代码是保存在本地编译的类数据共享存档(classes.jsa)中还是字节码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!