• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Class Source Code  RSS feed

 
raghav singh
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How can i obtain a particular java class source code? e.g class ArrayList source code

Thanks in Advance.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your JDK installation directory is a file named src.zip. It contains the Java source code of all the standard JDK classes, including the source code for java.util.ArrayList.
 
raghav singh
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper de Jong wrote:In your JDK installation directory is a file named src.zip. It contains the Java source code of all the standard JDK classes, including the source code for java.util.ArrayList.


Ok...hmm but i am currently using linux more precisely lubuntu. Do you have any idea where do i find it?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you install Java by using (L)ubuntu's package system?

Then you can get src.zip by installing the package openjdk-7-source:

sudo apt-get install openjdk-7-source

After that you should have src.zip at this location: /usr/lib/jvm/java-7-openjdk-i386/src.zip
 
raghav singh
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper de Jong wrote:Did you install Java by using (L)ubuntu's package system?

Then you can get src.zip by installing the package openjdk-7-source:

sudo apt-get install openjdk-7-source

After that you should have src.zip at this location: /usr/lib/jvm/java-7-openjdk-i386/src.zip


Ok matter solved. I downloaded the src-jdk.zip 1.7 manually.Thanks anyway i am now able to view the code of any class in java.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!