Is it possible to get the source code from Jar file?

Recommended Answers

All 2 Replies

Is it possible to get the source code from Jar file?

jar file only contains classes, if you can find a program that decompiles class file, then you will get the source.

The person who created the jar had the choice of what files (in addition to the class files) he included. Mostly people don't include the source, but some do. A jar file is really just a .zip file, so use any zip program to see what's in it.
Although you can decompile class files back to a functionally-equivalent source version, it's not the same as the original program, and usually its very hard to understand. If the person has used any of the available methods for making decompilation difficult then you may as well forget it unless it's an issue of national security.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.