943,777 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 2163
  • Java RSS
Jun 25th, 2007
0

source code invisible

Expand Post »
Hi to all,
I use NetBeans 5.5 and through Library manager I imported a jar file. How can I see the source code of the classes that the jar file contains? I got all classes from the jar file listed, I can see the name of constructors and methods but when I want to open them I get mesage Source file not found!
Thank you!!!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rinko is offline Offline
12 posts
since Apr 2007
Jun 25th, 2007
0

Re: source code invisible

The jar file only contains the compiled class files. Generally, if open source code is available, it is included in a separate directory or zip/jar file. If this is a jar that you downloaded, look in the directory you placed the downloaded files in for the source. If it is not there, check the web page where you downloaded the jar. There may be a separate download for the source.


If you locate the source you can use the Library Manager in Netbeans to specify the location of that source code ("Sources" tab) and then you will be able to browse the code and step into if with the debugger if you wish.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 839
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007
Jun 26th, 2007
0

Re: source code invisible

You can use decomiler to get java source code from the classes available in jar file...

there will be a exe called JAD with that you can decompile the classes in to source codes
Reputation Points: 119
Solved Threads: 7
Practically a Posting Shark
vinod_javas is offline Offline
871 posts
since Feb 2007
Jun 26th, 2007
0

Re: source code invisible

hmmm... jad decompiler doesn't work that well with the latest version of java, but there are still several other decent compilers out there who will do the job (if the source code isn't provided in the jar file, that is)
Reputation Points: 919
Solved Threads: 356
Nearly a Posting Maven
stultuske is online now Online
2,492 posts
since Jan 2007
Jun 26th, 2007
0

Re: source code invisible

Trying to decompile JAR file, where there is no published source code, I will see it as illegal activity that is not welcome here guys...
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 873
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: JBoss
Next Thread in Java Forum Timeline: Generate Report as PDF and Excel file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC