Log in

View Full Version : JDK classloader signature vs. JRE classloader signature


OHPen
July 30th, 2008, 10:15
Hi all,

while playing with modified java classloaders i discovered, that the original java classloaders are different from JDK to JRE (yes i mean even if both JDK and JRE have the same version.)

You can for example proof it if you download JDK v1.5.0_06. After installation you have a directory in which the JDK is located (with a nested JRE directory) and additionally a seperate JRE which was also installed with the second installation process. If you now compare the hashes of the classloaders of both JREs you will see that it is different.

I don't get how they can distribute different classloaders with the same installation. Has anyone an idea why they distribute two different classloader per package ?

Regards,

PAPiLLiON

dELTA
August 3rd, 2008, 18:44
I really don't have any real idea, but just intuitively, a *DK would typically need support for more debug hooks etc than a runtime environment I'd think. Also, hashing isn't exactly the optimal way to ascertain equality or non-equality between the code of two binaries, far from it actually. Please be more specific if I misunderstood something though.

PS.
I might not be able to give further replies for a while, I'll be traveling for a couple of weeks, starting tomorrow.

quasar
August 4th, 2008, 01:06
for 1.6 sources are released so maybe you should check if in 1.6 classloaders are also different.