Mounting the Java 2 SDK

If you wish to browse the sources of the Java 2 SDK, you can mount them in the IDE. However, since the sources provided with the SDK are packed with an extra level of hierarchy, it is necessary to unpack the JAR to mount the sources at the correct mount point.

To mount the Java 2 SDK in the IDE:

  1. On the command line of your system, change directories to the directory that contains the Java 2 SDK sources. This should be the root directory of the SDK.
  2. On the command line, use the jar tool to unpack the sources. For example, where src.jar contains the sources, type
    jar xvf src.jar
  3. In the main window of the IDE, choose File and choose Mount Filesystem.
  4. In the Mount Filesystem dialog box, select the Add Local Directory radio button.
  5. Click Browse, browse to the SDK's directory, and select the src directory in the file chooser dialog box.
  6. Click OK to close the dialog box and mount the directory.
  7. In the Explorer, right-click the node for the newly mounted directory and choose Properties.
  8. Click the Capabilities tab on the property sheet and set the Use in Compiler property to False. This prevents the SDK sources from being compiled when you compile your own Java classes.
Tip To save disk space, you can mount the SDK sources as a repacked JAR file or a zip file instead. Create the JAR file or zip file without the src/ level. When mounting the JAR or zip archive, select Add JAR File in the Mount Filesystem dialog box.
See also
Filesystems and the Java Classpath
Mounting a Filesystem
Using the JAR Packager
Changing the Mount Order of Filesystems
Disabling Compilation for a Filesystem
Configuring a Mounted Filesystem

Legal Notices