6

I have written a small Java program which i'd like to distribute on my website. I have used a few external librarys which declare following licences: Apache License (2.0), LGPL and one API doesn't declare any licence.. It's open source though.

I have spent a lot of time and effort developing my program. That's why I thought of distributing the software so that only donators (no matter how much or little they donate) can use it to it's fullest extent. Non donators get to see a nag screen now and then with a suggestion to donate and can only download one file at a time instead of simultanious downloads. (Yeah my program does some downloading)

Can I do that without getting legal issues? On one hand I would like to distribute the complete source of my project but on the other hand that would render the limitation of functions for non-donators useless, because they could simply remove the part with the serial nr check and redistribute my software..

Under what licence should i distribute my program?

Aaronaught
  • 44,005
  • 10
  • 92
  • 126
  • 3
    "one API doesn't declare any licence.. It's open source though" This is troublesome. What makes you think that something without a license would be open source? – Rein Henrichs Jun 02 '11 at 23:29

5 Answers5

7

First of all: You shouldn't lie your "costumers". If only donators can use all features, its not a donation, its a regular payment.

LGPL stricly allows to be used in non-free applications, Apache License I don't know. At least you should clear the API license. Just to say "Its open source" doesn't tell you, what you are allowed to do with it. Mail the maintainer and ask him.

Of course I don't know your application. Maybe you can split it into to parts, where one is published under an OSS-license and the other part is the paid one.

KingCrunch
  • 341
  • 1
  • 7
2

Can I do that without getting legal issues?

Sure, open source does not mean free (though it often is).

But you can not use the GPL license. Just use the average shareware license.

http://en.wikipedia.org/wiki/Donationware#Notable_examples

  • 1
    The OP uses external libraries that do *not* allow this sort of thing - it is essentially shareware. If you use those libraries, you have to respect their terms. – Pekka May 31 '11 at 22:40
  • 1
    At least the LGPL allows it and at least the API is a very big `?` :D – KingCrunch May 31 '11 at 22:44
  • @Pekka Terve Pekka! What do you mean with "OP"? :) I read the Apache Licence and as far as i understood it, it allows redistribution in closed source, as long as i include the disclaimer of the derivative works. So if i contact the author of the API, and tell him, what i intend to do with his software, and he gives me the okay, i should be fine? LGPL is not a problem with closed source? What about the disclaimers there? –  Jun 01 '11 at 14:27
  • @user by OP, I mean you ([Original Poster](http://en.wikipedia.org/wiki/Internet_forum#Thread)) :) I misremembered, I thought the Apache license had restrictions against commercial use. You just need to ship the disclamimers and copyright notices, so this may indeed be fine. +1 for @Hovertruck. However, if you publish your source code under an open license, somebody else will fork a version of it without nag screens so you should use a closed license (or rethink your business model - nagware has it *tough* against true Open Source) – Pekka Jun 01 '11 at 14:30
  • Well there is very little competition in this area so I'll stick with the nag screen :) It's not like I'm expecting to get rich or or so, i only want even a chance of getting some payment for the hard work.. Maybe it's better to distribute it as closed source, since I haven't even bothered to comment most of my code and It's pretty messy.. So where should these disclaimers and copyright notices go? I wanted to keep my program as simple as possible without any installation required as in executable jar file + a settings.properties file for the user preferences. –  Jun 01 '11 at 14:59
  • Would it be okay if i declare a "custom" licence on the website which also states that redistribution of the software is only allowed by linking to that website. That way it would be insured that everyone, who gets a copy of the application reads the licence before downloading. And by downloading they automatically agree to the terms and conditions declared in that licence? I'm still confused about the answer of @sinistraD, where he said that if I link statically to the libs under LGPL (meaning in my case packed into the jar?), I'd have to provide the source of my prog. (Sorry about the dp) –  Jun 01 '11 at 15:15
  • @Hovertruck: You *can* use the GPL. – Mark H Jun 01 '11 at 17:25
1

As long as you link dinamically to the LGPL-ed library you can do almoust anything with your program, includeing selling it or putting nagging screen to it. The apache license is much less strict then the LGPL. If you link statically to the LGPL-ed API you can still distribute it, but only with source code. You need to give the source to whoever buys your software. So you can't give your program without the source to anyone, thus a nagging screen is a non-sense, one can take it out and recompile it, a good example for this is FlowPlayer.

I recommend writing a new license if you want to use your own rules.

EDIT: For Java there's no such thing as static or dynamic linkage, everything is linked somewhat dynamically, yet not fully. As the writer of the license, Dave Turner said, the linking method used by Java (the use of the 'import' keyword) falls under section 6 of the license. This means you must provide a way to the user to change the version of the library you used, also reverse engineer it to debug his changes. So you don't need to give away the source, neither you need to give description of the internals of your program, but you can not deny the users to reverse engineer it (which contradicts most proprietary licenses). You still need to provide the source of library. So basically you can sell your program to non-programmer people, or who are not smart enough to decompile your program and remove the nagging.

I'm not sure, but I think other's can also publish a modified version of your program, ex.: a coder takes your limited version, decompiles, removes every limitation, compiles it and publishes your work. Don't be fooled of the idea that no one will bother doing that, I did something like this (I wrote something like, because I modified and republished an LGPL-ed program). People can go far enough when there's about money.

You might also want to write your own license where you can specify what parts of the code can not be changed if reverse engineered (ex. The User is permitted to reverse engineer the Product, but can not modify sections in the code marked with *insert mark here*), this way blocking them to remove the nagging/limitations.

  • Only the source for the LGPL'ed part must be provided. – hakre May 31 '11 at 23:25
  • Umm, what do you mean with linking dynamically or statically to the "LGPL-ed" library. –  Jun 01 '11 at 13:00
  • Added more details to the post –  Jun 01 '11 at 20:05
  • Umm, what? Why are users allowed to redistribute my work after reverse engineering..? Can't I forbid redistributing? Does one really have to write every single part of a program by their self to have full copyright to their work? –  Jun 01 '11 at 21:59
  • You see GPL and LGPL libraries\programs are created by enthusiasts who support more or less free software movement, thus making other using their work to do the same, or do the job themselves. I understand both parties. And again, I'm not certain they can, probably not, but since it might be true, I thought I tell you. You should really write your licence, there you can forbid redistribution, in the worst case someone will contact you (hopefully not a lawsuit) to remove it, but I wouldn't worry, few understand this licensing issues nowadays. –  Jun 01 '11 at 22:03
  • Also what use is it to "mark sections of the code" (with a comment of some sort?) if they won't be visible after decompiling? (or are they??) Oh dear, this turned out to be even more complex than i thought... –  Jun 01 '11 at 22:09
  • Comments are no good, they are stripped, but variable names for example are not. You can have "blocked" classes start with latter x or something. I advice you that if you earn 10 000$ with your program, just contact a lawyer and ask him your questions. Below that no one will bother screwing with you, above that you will have the money to do so. –  Jun 01 '11 at 22:09
  • "So basically you can sell your program to dump people, who are not smart enough to decompile your program and remove the nagging." i wouldn't say that all people who haven't learned to decompile java bytecode are dumb.. :D –  Jun 01 '11 at 22:14
  • xD I didn't meant to offend non-programmers, but you get the idea. The average user is less likely to be able to, so you shouldn't really bother. If your program gets popular some might try it, tho. Also, I edited the post (removed the word 'dump'). –  Jun 01 '11 at 22:18
  • Okay, two more things and i'll finally mark this as answered: Do I have to physically host the sources of the librarys or can i link to the corresponding download sites where to get them? Do i have to allow reverse engineering for all my class files, or is it sufficient to allow it only for those using the external librarys? –  Jun 01 '11 at 23:00
  • Since you can license multiple parts of your application differently you only need to allow access to the classes using the LGPL-es library, so the answer is no, you don't need to allow access to the full project. For the sources, yes I believe you should include them with their corresponding license file, since I've seen applications doing this. Just copy it to a sub-folder. –  Jun 01 '11 at 23:04
  • 1
    Okay thanks alot for all the helpful answers! I just moved every function that needs the external librarys into other classes and now my main class is free of any import declarations to external libs, and that's where all the nagging and restriction happens so i only need to forbid reverse-engineering on that class and the one that has the algorithm for serialnumber creating and checking. Great. Thanks again! –  Jun 01 '11 at 23:17
  • Good to hear, but don't take any answer/advice from me granted, read a bit more, ask other's too especially if you're making good money out of it. From my knowledge the solution you chose is the best possible. –  Jun 01 '11 at 23:24
0

Simple answer is check the fine print, there are licenses which claim if you use their stuff you should also make your code open source..

Long as this is not the case, you arent obliged to provide source, nor give it for free..

BugFinder
  • 301
  • 1
  • 4
0

Those two licenses do allow you to redistribute a derived application under almost any license, but at the same time, you must respect the terms of those licenses.

That means, for the LGPL licensed work, you must make the source code available for it in it's entire, plus any modifications you make to it. You can modify the LGPL library, but those modifications must be distributed in source form. However, when you link to an LGPL library, you are not required to make the linked work LGPL - you can distribute it under the license of your choice.

Dynamic linking or static linking are both allowed, but it must be possible for the user of your application to swap out the LGPL library for one of thier own. Dynamic linking is usually used to make this simpler. If you are static linking and don't want to distribute your source code - you must distribute the compiled object files for that code so that someone can link their own.

The apache license is even less restrictive than the LGPL. You can take Apache code and embed it directly into your application, or link it - and still distribute your code under a license of your choice.

@Hovertruck is mistaken by saying that you cannot use the GPL - infact, you can. The LGPL explictly allows relicensing of the work under the GPL. You can also license Apache derived work under the GPL.

A possible licensing strategy for you to use is to distribute a "reduced" version of your application under the Apache license (or other similar), and distribute a more compilete version under a proprietary license of your choice.

Mark H
  • 2,470
  • 1
  • 19
  • 12
  • I still don't understand what you all mean by "linking".. What I have done whith the libs is included them in my build path and used some of the classes and methods of the librarys in my code. I've not modified any of them. Swapping the library would mean that the new one would have to have the same package, class and method names for the program to work.. –  Jun 01 '11 at 17:57
  • Yeah, they'd need the same names to work, but the internal implementation of the functions in the lib can change, and the LGPL requires that anyone can change it for any application using the libraries. When you build your app, it first compiles each code file into an object file, and then the next stage is that all those object files are linked with any external libs. The LGPL requires that you provide the object files so that someone can do the linking stage themselves. – Mark H Jun 01 '11 at 18:08
  • well i guess i do provide the object files, since the jar file is practically an archive.. It contains the external jar files and all class files.. right? Maybe someone would be so kind and check out the app and maybe give some hints about writing the EULA. It's probably badly written and full of grammar mistakes since i'm not a native speaker, but thats not the problem, i'll have someone look into it who is a native english speaker. If you could point out if i've missed this and can't say that or whatever, i'd really appreciate it. –  Jun 01 '11 at 20:40
  • Here's the link to the website: [link](http://jokke.bplaced.net/2011/05/grooveloader-kostenlos-musik-horen-und-downloaden/?lang=en) –  Jun 01 '11 at 20:41