You can't use an arbitrary jar "as is".

You can wrap libraries as cn1libs: but a library might use arbitrary Java code which might be a problem see

We have a tutorial on porting native OS SDK's to Codename One in the developer guide and in video form

There are a lot of 3rd party libraries adapted to Codename One and most of them are open source. e.g. this one enables camera preview
You can use that as a sample starting point.
Was this article helpful?
Thank you!