r aldrich
r aldrich

Reputation: 17

Can I back out changes to my existing eclipse source code from a prior jar file.

The jar was created in eclipse but does not contain source code, only class files. Essentially I am wondering if Eclipse has a built in decompile feature that I can use to restore source code to an earlier version.

If I need to use a 3rd party decompile tool what is recommended?

Going forward, I will be sure to include source files in the .jar Thanks in advance for any advice.

I am using eclipse Eclipse Java EE IDE for Web Developers. Version: Luna Service Release 1 (4.4.1) Build id: 20140925-1800

Upvotes: 0

Views: 45

Answers (2)

greg-449
greg-449

Reputation: 111142

If the versions you want to go back to are very recent (in the last few days) you may be able to use the Eclipse local history. Right click on a file and select 'Compare With > Local History' to see what Eclipse has.

You can configure how much local history Eclipse keeps in the Preferences in General > Workspace > Local History.

Upvotes: 0

Konstantin Komissarchik
Konstantin Komissarchik

Reputation: 29139

There are Java de-compiler plugins available, but keep in mind that you are not going to get your original source code back. The de-compiled source will be equivalent to what was originally compiled, but may not be easy to read, especially if the classes were compiled with symbols removed.

Here is one plugin you can try:

http://jd.benow.ca/

Upvotes: 1

Related Questions