Java tool libraries

When we compile the java program, we get the .class files. Can I access these .class files of java core libraries? For example, can I access java.lang.String.class?

I'm actually doing research and trying to find a branch in some Java libraries. The tool I use to cover branches actually uses .class files.

thank

+3
source share
3 answers

In rt.jarin your JRE directory. You even have sources in src.zip. (Or you could just pull out the latest version of OpenJDK .)

, , . -Xbootclasspath java: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html

+5

, , jre/lib/rt.jar JAVA_HOME

+4

, # {JDK INSTALL PATH}/jre/lib/rt.jar. , IDE, Eclipse, ctrl + "String" private String var;, .

+1

Source: https://habr.com/ru/post/1747856/


All Articles