Mounting the Java 2 SDK

If you want to browse the sources of the Java 2 SDK, you can mount them in the IDE. However, the sources provided with some versions of the Java 2 SDK are packed with an extra src/ level of hierarchy. So you must unpack the JAR file to mount the sources at the correct mount point.

To mount sources of the Java 2 SDK, version 1.4:

  1. Choose File and choose Mount Filesystem.
  2. In the Choose Template pane of the wizard, select the Archive node. Click Next.
  3. In the Select Archive pane, browse to the JAR file that contains the SDK sources and select that file. Click Finish.
  4. In the Explorer, right-click the node for the newly mounted directory and choose Properties.
  5. 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.

To mount sources of the Java 2 SDK that have a src/ level in the JAR file:

  1. On the command line of your system, change 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 New wizard, select the Local Directory node. Click Next.
  5. In the Select Archive pane, browse to the SDK's directory. Select the src directory.
  6. Click Finish to exit the wizard 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. Create the JAR file or zip file without the src/ level. When mounting the JAR or zip archive, select Archive in the wizard.
See also
Filesystems and the Java Class Path
Mounting a Filesystem
Using the JAR Packager
Changing the Mount Order of Filesystems
Disabling Compilation for a Filesystem
Configuring a Mounted Filesystem

Legal Notices