How to decompile java class files?

23 Views Asked by At

I am working on a static analysis tool for java applications. In one of the tasks I need to present the security analysis of a method and the corresponding method from the source code. In the case of a java project where the source files are presented that's easy, however in the case of a jar file I need to find a more complex solution. So far I have come up with unzipping the jar file extracting the class files and then decompiling them to source files and finally reading the content. I can't find any suitable libraries for the decompilation process. Are there any suitable java libraries for that? I found these crf and procyon decompilers, but I need to collect the output as String and their main methods analyze(List<String>) and decompile() returns void. Does anyone no how to convert it to String or any other library that provides that functionality. Any help would be much appreciated.

0

There are 0 best solutions below