954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

source code invisible

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!!!

rinko
Newbie Poster
12 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

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.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

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

vinod_javas
Practically a Posting Shark
871 posts since Feb 2007
Reputation Points: 119
Solved Threads: 7
 

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)

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

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...

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You