This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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?
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.
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.