A Java Jar file is just a format for aggregating/compressing files, nothing more. Specifically,
JAR files are built on the ZIP file format. Computer users can create
or extract JAR files using the jar command that comes with a JDK. They
can also use zip tools to do so.
For instance, 7zip can read them. So I wouldn't say there are any ethical or legal barriers to reading the code, and learning from it.
As for making changes to them, as others have said, that partly depends on intent (and possibly what you do with the results - I am not a lawyer :). For some programs, such as Minecraft, the author even encourages people to make modifications to the basic program (which require installing changes into the .jar file).
Or can this be used as "inspiration"?So I think the OP wants to know is simply opening the JAR unethical, or is it OK to open it and learn from it? The OP never asks about extracting and using/modifying the code with the intent to pass it off. I think they are just asking about the ethics of browsing through someone else's JAR and reading the code to figure out how it works. – FrustratedWithFormsDesigner Aug 18 '11 at 18:43