开发者

When does Java's JVM unzip jar files?

Java's jar file format builds off of the zip file format, and supports compression of the class files inside it. When and how does the JVM decide which c开发者_JAVA技巧lass files to uncompress and pull out of the jars on its classpath? Is the process dynamic and done at runtime as classes are needed, or are they all uncompressed up front before the program actually runs?


Is the process dynamic and done at runtime as classes are needed

Yes. You can log the activity of the class loader as follows (in the terminal):

java -verbose:class [ your other flags and arguments... ]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜