How does Mac OS X read JDK source code in eclipse?

Source: Internet
Author: User

Operating System: Mac
OS X 10.6.8 snow leopard

JDK in Mac does not contain source code, so it cannot be viewed in eclipse.

Need to download Java from http://connect.apple.com
For Mac OS X 10.6 update 6 developer package. After downloading, install the package first, and then enable terminal.
Input:

  1. Sudo
    -S
  2. CD
    /System/library/frameworks/JavaVM. Framework/home
  3. Ln
    -S/library/Java/javavirtualmachines/1.6.0 _ 29-b11-402.jdk/contents/home/src. jar.
    • Ln-S/library/Java/javavirtualmachines/1.6.0 _ 29-b11-402.jdk/contents/home/docs. jar.


In eclipse, use command + Click to view the source code of a class. Select "add source" and select the SRC. JAR File above.
File

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.