Eclipse如何跳转到Java系统类的源代码

作者阿里云代理 文章分类 分类:linux图文教程 阅读次数 已被围观 959

In Eclipse you want to navigate to the source code of standard class String, and you get the following message: Source not foundimage.pngSolution

(1) Install JDK in your laptop, and then configure it into Windows->Preferences->Java->Installed JRE. Delete existing entry for JRE:



image.png

image.pngAnd click Add… button:image.pngAdd JDK instead:image.pngOnce added, set JDK as default entry:

image.png(2) Preferences->Java Build Path, remove existing entry of JRE:

image.pngClick Add Library button:image.pngChoose JDK instead:image.pngOnce done, you can now navigate to the source code of standard class like String now.

本公司销售:阿里云新/老客户,只要购买阿里云,即可享受折上折优惠!>

我有话说: