开发者

The size of rt.jar is different between JRE and JDK

开发者 https://www.devze.com 2023-01-18 19:58 出处:网络
What I noticed is that rt.jar\'s size is different betwee开发者_C百科n JRE and JDK. It is bigger in JDK. Why is it so?IIRC, primarily the JDK version contains more debug information.

What I noticed is that rt.jar's size is different betwee开发者_C百科n JRE and JDK. It is bigger in JDK. Why is it so?


IIRC, primarily the JDK version contains more debug information.

There appears to be the same number of files in both:

C:\Program Files\Java>jdk1.6.0_21\bin\jar.exe tf jdk1.6.0_21\jre\lib\rt.jar | wc -l
17036

C:\Program Files\Java>jdk1.6.0_21\bin\jar.exe tf jre6\lib\rt.jar | wc -l
17036


The JDK includes among others also the implementation of the javax.tools API which gives programmatic access to the compiler. If you're curious for more, just extract the JAR using some ZIP tool and compare the contents.


There are more files in the JDK version, compared to the JRE version.

0

精彩评论

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

关注公众号