My Android app needs javax.activation and javax.mail (both GPLv2 licensed). However, I don't want to make my app GPL-licensed. What are the possibilities to not break the license requirements regarding the classpath exception? Currently, I use maven-dependency-plugin to pull those packages' source code and merge the compiled stuff with my own into one apk. Is that ok? If not, what is?

1 Answer 1


As long as your app does not depend on the internals of those libraries (i.e. you can replace them with a different version without having to modify your code), you are fine and you can distribute your app under any license you like.

This right you get from the classpath exception, which effectively limits the copyleft nature to the GPLv2.

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.