0

I have attached the source code of rt.jar file ie src.zip to my Eclipse.

My problem is that, After adding the source code of rt.jar to eclipse, when I open any class,for Example "String" class, The eclipse itself showing ".class" file for "String" only,It does nopt showing ".java" file for "String".

How can I see the ".java" file?

durron597
  • 31,968
  • 17
  • 99
  • 158
reddy
  • 667
  • 2
  • 9
  • 19
  • I think showing .class is fine. However the .class file should have the source attachment, and it should show the source code contents. – sakura Feb 20 '14 at 13:42

2 Answers2

0

The source file is exactly that, the source file. You are reading the files in the .jar. Adding the source is not a magical way in which you can edit the .jar. If you could change the underlying Java source code it would be one of the biggest security risks. The .class file is a representation of the .java file and as such there is also no reason for you to need the .java file.

Nicky Tellekamp
  • 174
  • 1
  • 8
0

Did you try to attach the source code, as shown in the below screen shot.

enter image description here

Jay
  • 9,189
  • 12
  • 56
  • 96