> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.codenameone.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Can I use any JAR?

You can't use an arbitrary JAR "as is". Please also check the maven dependency discussion in [this post](https://www.codenameone.com/blog/moving-to-maven.html).

You can wrap libraries as [cn1libs](https://www.codenameone.com/cn1libs.html) but a library might use arbitrary Java code which might be a problem, see [this](https://www.codenameone.com/blog/why-we-dont-support-the-full-java-api.html).

We have a [tutorial](https://www.codenameone.com/blog/integrating-3rd-party-native-sdks-part-1.html) on porting native OS SDK's to Codename One in the [developer guide](https://www.codenameone.com/developer-guide.html).

There are a lot of 3rd party libraries adapted to Codename One and most of them are open source. e.g. [this one](https://github.com/codenameone/CameraKitCodenameOne) enables camera preview. You can use that as a sample starting point.