Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view the source code inside a JAR file?

Tags:

java

I downloaded the code for a LAN messenger from sourceforge. It is an executable JAR file.
You double-click it and your messenger starts.

I want to study the source code. How do I do that?

like image 940
A User Avatar asked Jun 30 '12 03:06

A User


2 Answers

Sourceforge has links to the source.

like image 92
Naddiseo Avatar answered Nov 15 '22 14:11

Naddiseo


Extract source code from .jar file

(1)Use JD GUI (http://jd.benow.ca/). Open the application, drag and drop your JAR file into it.

(2)You can extract a jar file with the command :

jar xf filename.jar

References : Oracle's JAR documentation

like image 25
Aruna Avatar answered Nov 15 '22 12:11

Aruna