Reading class files contained in Jar file
In my web application the developer has compiled its dependant class files as jar file. Though, i have been able to find an appropriate decompiler but i am not sure if all the code is visible to me. I just want to know if private and protected classes gets decompiled via decomipiler. I have downloaded the decompiler from this site http://java.decompiler.free.fr/ And most importantly why would a developer compile its depandant files as jar file and add it in the main project? Astride re-using the code.
A decompiler can decompile all classes, including those which are protected, package private, nested classes etc.
Developers sometimes repackage dependencies inside a jar to so that additional jars do not need to be referenced. This often leads to very problematic situations when multiple dependencies do this, with more than one repackaging the same code - the practice is discouraged. The exception to this is for an application instead of a library, in that case conflicts can not occur because it is not the dependency for anything else.
精彩评论