When we compile a java program, we get .class files. Can I access these .class files of java core libraries? e.g. can I have access to java.lang.String.class ?
Actually I am doing a research and trying to find branch coverage of some java core libraries. The tool I am using for branch coverage actually instruments the .class files.
Thanks
It's in rt.jar in your JRE directory. You've even got the sources in src.zip. (Or you could just pull the latest version of OpenJDK.)
Also, if you want to instrument the base classes, you'll also need to specify a boot classpath. Look at the -Xbootclasspath option for java: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With