This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
Author

debuging WEB app without source codes [ECLIPSE]

Jan Krystof
Greenhorn

Joined: Feb 12, 2011
Posts: 3
Hello,

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?

thanks

Jan
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

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
 
Don't get me started about those stupid light bulbs.
 
subject: debuging WEB app without source codes [ECLIPSE]
 
Similar Threads
I need to step thru another war that I link to...
debug j2ee web application using eclipse
Debugging code without sources
Import or inline?
How to debug using Eclipse?