I have one jar file. I want to see the source code of classes of this jar file and i need to use source code of this jar file. Is there any option to view and use that jar file source code?
Is there any option in eclipse to extract jar file and to see the source code of that jar file?
Ivan Jozsef Balazs wrote:Is the source code available at all?
I dont have source code, is there any possibility to see the source code of classes present in that jar file in eclipse?
Ivan Jozsef Balazs
Joined: May 22, 2012
A jar files typically contains class files and other resources, typically no sources, albeit it is not unconceivable.
The class files do not contain every information the sources do. For example local variable and parameter names will be missing. Neither Eclipse nor other tool will be able to recover them if these pieces of information are missing. The method names and parameter types are of course visible.
Joined: Oct 09, 2012
Actually, i tried to add plug in eclipse but i am getting error by selecting "Help-->Install new software". The error is "Can not complete the request : The installation not configured properly for software updates. See the error log file for details."
What plugin did you try to install? The log file mentioned is at workspace/.metadata/.log, look in there for additional details.
Usually you don't need the source to access classes and their methods that are packaged into a JAR. All you really need to do is add the JAR to the build path of your project. Eclipse will then let you browse through the classes in the jar and view all public fields and methods.