view java source code

前端 未结 6 1998
Happy的楠姐
Happy的楠姐 2020-12-08 21:41

Is any way to view the actual code behind the default classes in Java (java.awt.*;, javax.swing.*;, etc) to see exactly what it is that is

6条回答
  •  自闭症患者
    2020-12-08 22:14

    The Java source code for all the API classes is shipped in the JDK installer in a file named src.zip. It's often just sitting in your install directory. Unzip it, and have a look.

    If it's not there, you may have chosen not to install it; reinstall the JDK and watch for the "source code" option, making sure to include it.

提交回复
热议问题