Depending on the library, you may have to write a Java wrapper. The main purpose of this wrapper is to convert all Java types to types supported by B4A (e.g. ArrayList -> List, HashMap -> Map, etc.) and to adapt the code to the B4A way of doing things (e.g. we do not use XML files in B4A for the views). This wrapper can expose to B4A only the fields and methods that you need. In some cases, usually when the library is not visual (no views), the wrapper is not necessary. With JavaObject, you can access the fields and methods by reflection. There's a tutorial about this.