I use eclipse and lots of times I need to open a source file of an internal class in java. I do this by pressing ctrl + click on that object. For example I want to see the codes of the Scanner
class, and when I try to open it by ctrl + click on a Scanner
object, it shows that, "source is not found". The error is this:
The JAR file in /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar has no source attachment.
You can attach the source by clicking Attach Source below:
And there is an Attach Source button under it. I searched a lot but all people had the same problem with the projects on their filesystem, not the internal classes. What should I do? Is there a way to change that /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar
file?