I’m currently involved in documenting how a java mapping works for a client. There are two challenges with this.
- I have not created the mapping, so I have no idea of what it does.
- The consultant did not leave the code.
That is some quite big challenges. The customer is no longer using the consultant, so it is not an option to ask the person. I could test the mapping but it would not reveal anything that I did not know already. I then had to decompile the code, which is quite simple.
I have done decompiling before to learn how other companies is doing some of their development or why it gives problems. I have been using JAD for decompiling of the java byte code with success before. So why not use it again.
The command is quite easy:
C:\temp\IA_FILE_URL_ECB_XRATES\com\sap\xi>jad FILE_URL_ECB_XRATES.class Parsing FILE_URL_ECB_XRATES.class... Generating FILE_URL_ECB_XRATES.jad
Then it is possible to open the .jad file in a text editor to start to understand what is going on. Notice that some code cannot be decompiled for on or and other reason. It is probably because they are using some complex format of the code, which is difficult to decompile.
When I do custom development of java mappings in eclipse, I always make the source and bin directory the same. That way the source files is places besides the java files. So when it is packed everything gets into the archive. Otherwise my guess is that you are hiding something of your bad code.