开发者

When does Java's JVM unzip jar files?

开发者 https://www.devze.com 2022-12-31 23:52 出处:网络
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 pu

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

精彩评论

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