Java代码是保存在本地编译的类数据共享存档(classes.jsa)中还是字节码? [英] Is the Java code saved in a Class Data Sharing archive (classes.jsa) compiled natively or is it bytecode?

查看:536
本文介绍了Java代码是保存在本地编译的类数据共享存档(classes.jsa)中还是字节码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否创建类数据共享存档(通过运行 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


加载一组将系统jar文件中的类转换为私有内部表示,并将该表示转储到文件中。

loads a set of classes from the system jar file into a private internal representation, and dumps that representation to a file.

但是没有说明此代码编译与否。

But says nothing about whether this code is compiled or not.

(可能相关:通过向classes.jsa添加自己的应用程序类来加速应用程序启动

推荐答案

在这两种情况下,它都是缓存中的本机代码(请参阅您提供的有关在不同体系结构的机器上重新生成缓存的链接中的讨论)。 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)中还是字节码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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