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?

1 Answer 1


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
    Commented Nov 13, 2018 at 19:36
  • 2
    @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. Commented Nov 13, 2018 at 20:21
  • The GPL license specifically says that it only covers distribution. Not "use".
    – Brandin
    Commented Nov 13, 2018 at 21:06
  • 1
    @Brandin: The GPL license does cover some forms of use, in particular the use in a derived work that is distributed. Commented Nov 14, 2018 at 7:12
  • 1
    @Brandin: Creating a derived work is one of the rights that is protected under copyright, so you always need a license to create a derived work, even if you never intend to distribute the derived work. The only open question is whether using (calling/linking) a library actually creates a derived work, to which the GPL assumes that it does. Commented Nov 14, 2018 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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