haim
haim

Reputation: 599

How can I see the source code of packages in Eclipse?

i started to learn android program ,and i curious to see the code of the classes/ for example the class of import android.app.Activity.

how can i see the source code of the packages in eclipse?

Upvotes: 0

Views: 530

Answers (2)

Rachit Mishra
Rachit Mishra

Reputation: 6112

As in android sdk what we get is a compiled jar file which contains all the classes. So in eclipse you can't read the source, but you may use, The official online version to read the source code of classes:

http://developer.android.com/reference/packages.html

[In eclipse although by CTRL+Click on import may show you a bit about the class, although that won't be easy to understand :)]

Upvotes: 0

Mario Rossi
Mario Rossi

Reputation: 7799

You can attach source code to libraries. yourProject / Properties / Java Build Path / Libraries / yourLibrary / Source attachment, and then enter the folder or zip file containing the source code (which you need to download separately).

If you only have the object code (.class files), then you need to learn to read ByteCode (which Eclipse shows pretty nicely) or use a Java ByteCode disassembler.

Upvotes: 1

Related Questions