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.jarin your JRE directory. You’ve even got the sources insrc.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
-Xbootclasspathoption forjava: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html