• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class implementions

 
Moein Sol
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I use eclipse as IDE,how can I see class implementation in this?for example,class ArrayList,when I click to open its deceleration,eclipse can't show that.
please,guide me step by step!
Thanks.
 
Rob Spoor
Sheriff
Pie
Posts: 20493
54
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to attach the source for the classes first.
 
Moein Sol
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. how can I attach?
 
Paul Clapham
Sheriff
Pie
Posts: 20725
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go into your build path, find the jar file in question, and underneath it you'll find a "Source Attachment" option which you can edit.
 
Moein Sol
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Go into your build path, find the jar file in question, and underneath it you'll find a "Source Attachment" option which you can edit.

I attached,but when I hold ctrl and click on for example JButton,it says that can not find JButton.class , but it show some text ( no in code format) under that.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What source did you attach? The javax.swing.JButton source is in the src.zip file that comes with the JDK. Eclipse should automatically pick up that zip file if you properly configured Eclipse to use a JDK (by default Eclipse uses a JRE). To configure a JDK, in Eclipse go to Window | Preferences | Java | Installed JREs, click the Add button and browse to the JDK home folder. Then make sure that the JDK is selected as the default installation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic