Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What are the ethics behind unjar-ing a jar file from the industry standpoint when let's just say you weren't given the implicit OK to use and edit? I don't want this to be an open-ended question. Is it unethical and should this be avoided at all costs? Or can this be used as "inspiration"?

Thanks!

share|improve this question

migrated from stackoverflow.com Aug 18 '11 at 18:30

This question came from our site for professional and enthusiast programmers.

3  
Did you accept a EULA that prohibits it? –  parsifal Aug 18 '11 at 18:29
    
Nope............ –  O_O Aug 18 '11 at 18:30
1  
What is the license that was distributed with the jar? –  Jeremy Heiler Aug 18 '11 at 18:31
    
Don't think there was any license included with the jar. –  O_O Aug 18 '11 at 18:33
2  
@Anna Lear: At the end of the question the OP asks: 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

3 Answers 3

up vote 6 down vote accepted

Intent matters here. If you intend to look at what they did and copy it and sell it as your own then yes it is unethical.

If you are looking to see is there is some weakness you can exploit then yes it is unethical.

If you are wanting to make sure that you are not bringing something on to your network that is going to create havok then I would say no it is not unethical.

The other thing that matters are your actions. If it was not your intent originally to steal it but after seeing how they did it you decide to write your own then that would be unethical.

If after looking at it you decide to go with a different vender because you did not like what you saw under the hood I do not think is unethical.

share|improve this answer
    
Could you clarify this a bit? It seems like the intent is the unethical thing, not the opening and viewing of a jar file. Because without telepathic ability, I can't observe someone doing "unzip -l blah.jar", and then deeming it "ethical" or "unethical" by your standard. –  Bruce Ediger Aug 18 '11 at 20:56
1  
@Bruce - No you can not. This is an ethical judgement not a legal one. I suppose if you are in a position to judge the ethicality someone elses actions on this you will need to ask them why they did it and what they intend to do now. –  Chad Aug 19 '11 at 13:13
    
OP states there was no license. Since a JAR file is simple to open for any computer savvy person, certainly for any developer, by distributing the JAR file in such manner, the distributor has essentially declared: "I don't care - do what you like with it". No 'ethical problem' here, regardless. If there is some sort of license or NDA attached, then even if it may not be legally enforceable, ethical considerations would come into play IMO. –  Vector Apr 5 '13 at 23:28
    
@Vector: It's absolutely not true that the lack of a license means "do what you like with it" - quite the opposite, actually. It means you have no rights at all. If you got it from the author, that might constitute an implicit right to use it, but definitely not to modify or redistribute. –  Michael Borgwardt Aug 22 '13 at 8:25
1  
@Vector: Legally you have full rights of ownership until you have explicitly renounced it and a finder has established this fact. But arguments by analogy are very questionably, and in fact completely meaningless in legal contexts. If we are talking about the practical ethical considerations, it's reasonably simple: if you know the author, ask. If you don't know the author, assume that you have no rights at all, since you cannot even know whether the author himself wanted it to be distributed. –  Michael Borgwardt Aug 22 '13 at 9:35

What's the license? Have you signed something (such as an EULA, which are debatable if they are even legal) that told you that you were forbidden from modifying the JAR file?

I'm guessing that modifying the JAR file is of the same ethics as looking at/modifying a compile binary. Whether or not you think that's moral/ethical is up to you/the courts.

share|improve this answer
    
There was no license. Would that mean it is free to use? –  O_O Aug 18 '11 at 18:37
1  
@O_O No license does not automatically mean that it is free to use. Do some research from the source of the JAR file to find out if there is some license that you didn't see before. –  Jesper Aug 18 '11 at 19:14
1  
No license means precisely that it is not free to use. Unless there are license terms which grant you other rights, creations are covered by Copyright, which forbids anyone from the copyright holder from copying or making derivative works (within the limited boundaries of Fair Use exceptions) –  Trevor Powell Aug 19 '11 at 0:27

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).

share|improve this answer
    
Great example with Minecraft. :) –  O_O Aug 18 '11 at 19:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.