Is it possible to recover src from a deployed . WAR file?

Asked

Viewed 232 times

1

I’m working with a lot of legacy applications here. One of them (in production) needs to be edited because it has no log.

I decompiled, but I have no idea how to reassemble in this situation. I couldn’t if you want to recompile the individual classes edited because of compiler optimization. (I’m using Java 6)

  • It is not possible to get to the original sources through this process.

  • @Reginaldorigo refers to the fact that even recompiling without editing, the "new" binary will be different from the previous?

  • No. If you can compile like this, the binary will be equal.

1 answer

0

No, I found that it is impossible (to date today) to do this process. There are several ways to retrieve code to read using decompilers, even online, but editing this artifact and resubmitting to deploy is not feasible.

As my case it was only necessary to monitor the content, IE, they had no new features to be implemented. Turning the problem around using Jamon and Aspectj was enough. Here is a very, very simple tutorial on the technique. http://keylesson.com/index.php/2015/12/16/monitoring-java-application-with-aspectj-and-jamon-2576/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.