I have created a program which uses the JNA (JAVA Native Access) library.

Now, I would like to register it under some software license (I have not yet decided which), my question is:

Can I register my software under any license I choose or am I limited to certain licenses under the terms of the JNA library licenses?

I've seen the following link (a file listing the licenses for the JNA library in GitHub): https://github.com/java-native-access/jna/blob/master/LICENSE It says that the library is registered under two licenses: 1. LGPL 2. Apache

Is there a limited type of licenses where I can register my software? If so, to what types of licenses am I limited to?

bumped to the homepage by Community yesterday

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

By using a third-party library in your product, your product becomes a derived work of that library under copyright law. This in itself (slightly) restricts the licenses you can choose for your own code, because all parts of the product must have compatible license terms.

The JNA library is dual licensed and you get to choose which of those two licenses you want to conform to.
The LGPL license is a weak copyleft license that requires that it is possible for end-users to replace the library with a different version.
The Apache license is a permissive license that places few requirements on you.

With this choice in licenses for the JNA, you are not really limited in your choice of license. If you want to use an open-source license, you will have to tell us what freedoms you want to give you users. If you don't want to give your users the right to make changes, you must contact a lawyer to draft you a closed-source license. We can't advise you on the latter.

  • "By using a third-party library..." This is not accurate. Maybe if you distribute the library, you could say that. But simply by "using" a library that happens to be installed on the system, you are not creating a derivative work. For example, all Windows programs use libraries from Microsoft, but they do not create derivative works of Microsoft, no matter what Microsoft says in their license agreements for the system libraries. – Brandin Nov 13 at 19:36
  • @Brandin: We may have to agree to disagree on that point. At least the authors of the GPL license seem to have the same opinion as me, but to my knowledge it has never been tested in court. – Bart van Ingen Schenau Nov 13 at 20:21
  • The GPL license specifically says that it only covers distribution. Not "use". – Brandin Nov 13 at 21:06
  • @Brandin: The GPL license does cover some forms of use, in particular the use in a derived work that is distributed. – Bart van Ingen Schenau Nov 14 at 7:12
  • That is distribution. 'Use' in general does not imply redistribution. For example, if you 'use' Microsoft Windows system libraries, you are not redistributing anything, so you there is no way you could need a license for that. If you redistribute some libraries, then of course you need a license. And for GPL libraries of course, the license may require that you release source code. – Brandin Nov 14 at 9:18

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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