Before anything, two caveats: I'm going to assume you are debugging code from OpenJDK (which has the source code for sun.nio.fs.UnixFileSystemProvider
), and the IntelliJ version I'm using is the Ultimate, I'm not sure if this also works in the community edition; if so, then let me know and I'll edit my answer.
You need to get the source code and then "attach" it for it to match the bytecode (so make sure the source code you get is the once corresponding to the compiled version)
1 - get the source code
For v6 and v7:
If you are using a debian-based Linux distribution it is preferable installing the sources from the deb repositories:
sudo apt-get install openjdk-7-source
Or using aptitude
:
aptitude install openjdk-7-source
The source code will be located in /usr/lib/jvm/java-version/src.zip
Alternatively there is a version of OpenJDK 7 available for download here: http://download.java.net/openjdk/jdk7/
For v6: http://download.java.net/openjdk/jdk6/
If you are using OpenJDK v8 then the process to download the source code gets a little bit more complicated, it involves cloning repositories from the OpenJDK's website using mercurial
(and it would be too long to explain how to use mercurial here, so I hope you're using v6 or v7)
2 - Attaching the source code to your binaries
when you get the decompiler stub from IntelliJ, click on "Attach Sources...":

Then browse to the location (directory or zip file) where the source code is and select it:

If everything was Ok you should be able to browse through the source code now.