FOLLOW ME Twitter Facebook Вконтакте LinkedIn RSS Feed

How to add Java sources and docs to your JDK on Mac OS X

Category: Java
Jan 2, 2013
Konstantin Bulenkov

Every time I setup a new Mac OS X virtual machine with Java on board I can’t find java sources (src.zip or src.jar files). Here is a short instruction how to setup JDK with the sources and documentation on Mac OS X.

  1. Go to https://developer.apple.com/downloads and sing in.
  2. Search for ‘java developer’ or simply click https://developer.apple.com/downloads?q=java%20developer
  3. Choose the latest build labeled Java for OS X 201X-0YZ Developer Package where X, Y, Z may vary.
  4. Add this JDK to your IDE as you usually do. If sources are not attached automatically, attach them manually. Here is the path to src.jar
    /Library/Java/JavaVirtualMachines/1.6.0_XX-XXX-XXX.jdk/Contents/Home/src.jar

    where XX may vary from version to version.

Leave a comment