After long time... Here is maybe something interesting for you. Sometimes I got the problem to see the java-X-source-code in Eclipse I am not getting it fixed. Now I found a great and easy solution to fix it:
In Eclipse
- On Ubuntu install the missing java-sources:
apt install openjdk-X-source
- Open the preferences
Window -> Preferences
- Go to: filter:
installed jre
- Choose and open your Java-Runtime i.e. java-8-openjdk-amd64 -> Edit
- Now click on the
JRE system libraries
-list on the library:.../rt.jar
and open it withSource Attachment...
- In the Source-Attachmenbt Configuration Window choose
External location
and navigate to the Path of the in Step-1 installed openjdk-X-source i.e. for java-8/usr/lib/jvm/java-1.8.0-openjdk-amd64/src.zip
Now you can open any java-class and see the source :)
Hope it helps you a lot like me, have fun!