A library mode session

This class represents a library mode session. It can be used to access the classes and methods of the loaded library.

You can get a CJ3Library instance by:


  • To load a class, access it and await it.
  • To call a static method, call it as a method on a loaded class and await it.
  • To construct a class into an instance, use await new.
  • To call an instance method, call it as a method on an instance of a loaded class and await it.
  • To read/write a public field, do so normally.
  • instanceof is supported.

Conversion rules

Type conversions adhere to the LiveConnect specification. There are some extensions:

JavaScript typeJava typeNote
Uint8Arrayboolean[]By reference
Int8Arraybyte[]By reference
Uint16Arraychar[]By reference
Int16Arrayshort[]By reference
Int32Arrayint[]By reference
BigInt64Arraylong[]By reference
Float32Arrayfloat[]By reference
Float64Arraydouble[]By reference
anynetscape.javascript.JSObjectOpaque reference

For other types, refer to the LiveConnect specification.


class CJ3Library {
getJNIDataView(): DataView;

Returns a DataView of the library’s raw JNI memory.

Was this page helpful?
Suggest changes