Version 1

    If you don't understand any of these steps, or can't get them to work, just skip over them and continue; we'll see if there's a sensible error message at where you get to.

    1. Ensure you have a working Java 8 (or Java 9?) JDK installed. Oracle have official builds.
    2. Check out the sources (jdk8_tl or jdk9_dev).src[share]:java.util..*
    3. Download the latest version of Intellij IDEA you can get your hands on, and unpack it.
    4. Get IDEA some memory. Edit idea64.vmoptions. Xmx: ~at least 3g. MaxPermSize is less relevant, as we're not running all that much code. If you have less memory available, you really don't want to go into swap.

    faux@astoria:~% cat idea-IC-133.696/bin/idea64.vmoptions -Xmx4g -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=96m -ea …

    1. Create a new project
      • location: e.g. /home/faux/code/jdk8_tl/jdk/src/share
      • jdk: new jdk: (for a build) e.g. /home/faux/code/jdk8_tl/build/linux-x86_64-normal-server-release/images/j2sdk-image/
    2. Ok! This should open up the sources, but not have identified any of it as source.
    3. IDEA settings (not project structure):
      1. search for “build process heap”
      2. Build process heap size (Mbytes): 3000 (not sure what the lowest possible value for this is, pretty sure it's over 2g. Obviously you don't want to be in swap if you can avoid it.)
    4. Project structure (the other IDEA settings dialog): language level: 8.0.
    5. Edit the JDK (project structure)'s classpath to "add" "..../images/j2sdk-image/lib/*.jar", e.g. including "tools.jar", "dt.jar", ...
    6. Right-click the "classes" as a source folder, "build-path", "use as source folder".
    7. The SNMP stuff seems not to build with this method, this is still unknown. You can exclude it from the project; right-click on an offender and "build path" -> "exclude".
      • com.sun.jmx.snmp
      • sun.dc
    8. Everything else seems to build.

    You can now run analysis on specific interesting packages. For example, let's say we want to inspect "java.util" for the default warning set:

    1. Analyse -> Inspect code...
    2. Custom scope
    3. "..."
    4. "+"
    5. name is irrelevant
    6. Expand "production classes" -> "share" -> "java" -> "util".
    7. Include recursively (this generates a pattern of "src[share]:java.util..*")
    8. Inspection profile is fun to play with. Defaults are fine, ish.
    9. Ok!