File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes debuging WEB app without source codes [ECLIPSE] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "debuging WEB app without source codes [ECLIPSE]" Watch "debuging WEB app without source codes [ECLIPSE]" New topic

debuging WEB app without source codes [ECLIPSE]

Jan Krystof

Joined: Feb 12, 2011
Posts: 3

firstly, I feel that this group (EJB and other Java EE tech...) is perhaps not the best one for this question..., however I guess that here will be experienced guys which I need. Nevertheless, my topic is related to J2EE isuues so I hope this topic will not be kicked off.

I have war file with NO source codes and I need to debug it. I use Eclipse so I did import the WAR file into my IDE. I was able to place breakpoint into the desired file since the respective `.class` file was automatically decompiled into `.java` file with use of JadClipse plug-in. But However, the breakpoint was not working. Then I decided to use jad.exe to decompile all classes into java source files and put them int src folder. Then I found a lot of erros, since the classes used generics and the jad.exe was not able to deal with type erasure.

Do you have any suggestions how to overcome this problem and be able to debug such project?


E Armitage

Joined: Mar 17, 2012
Posts: 989
If you are meant to be debugging the code then the source code should be made available to you.
Otherwise you are stuck with hacking away with JD-Ecplise and JAD and manually fixing the code until it compiles.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33106

I think IDEs and other tools is a better fit. I'm moving this thread there - a link will stay in the original location.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Peter Johnson

Joined: May 14, 2008
Posts: 5852

Also, rather that decompiling all of the .class files and then trying to get them all to work, only decompile the one or two classes that you really need to work on. Then when you get them to compile, simply replace just those couple of class files in the original WAR. This is what I do when I need to make corrections to binaries I get from others. I do this even if I have access to the sources.

JBoss In Action
I agree. Here's the link:
subject: debuging WEB app without source codes [ECLIPSE]
jQuery in Action, 3rd edition