Is the Java code saved in a Class Data Sharing archive (classes.jsa) compiled natively or is it bytecode?

非 Y 不嫁゛ 提交于 2019-12-09 17:28:02

问题


I'm trying to know whether creating a Class Data Sharing archive (by running java -Xshare:dump) compiles byte code into native code.

There is not a lot of documentation about the internals of Class Data Sharing. The page I linked says that java -Xshare:dump

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.

(Possibly related: Speed up application start by adding own application classes to classes.jsa)


回答1:


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.



来源:https://stackoverflow.com/questions/15024297/is-the-java-code-saved-in-a-class-data-sharing-archive-classes-jsa-compiled-na

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!