Rob Prime wrote:Check out the java.util.jar package.
Thanks for reply.
I can read data from jar file using java.util.jar package, but from here onward how to convert class files into java files.
actully my jar files contains only class files and i want to scan class files to extract some matching code from class file.
There is some java code in java file and now i dont have java files, i have only .jar file and it contains all class files so i want to develop utility that could scan all class files and return my desired out put.
The only thing missing seems to be the generics info.
None of the publicly available decompilers I've seen support the Java 5 class file extensions (like generics). That information is in the class file, it just seems that nobody bothered to update the decompilers. I hacked up a copy of JODE at one point in order to add that, and came to the conclusion that it is indeed possible if one were so inclined (at least for classes, instance fields and method parameters, not sure about local variables).
I'm gonna teach you a lesson! Start by looking at this tiny ad: