Session interface — get_str, get_int, get_bool, and execute() all work exactly as they do for other runtimes. When you need to go further — reading a specific Java field or invoking a method by class name — session.jvm gives you a JVMSessionProxy with those primitives.
Detecting JVM apps
Filter thelist_apps() results by runtime == "jvm" to identify Java processes.
Attaching to a JVM app
Attach by display name, just like any other runtime.Reading state with standard accessors
The same flat dot-notation key-value map that NSP exposes for V8 and CLR apps is also available for JVM apps. Java object fields are normalized into SSF keys automatically.Reading fields directly with session.jvm
session.jvm gives you read_field() for fetching a specific Java class field by fully-qualified class name. The value is returned as a native Python type.
Invoking Java methods
Usesession.jvm.invoke() to call a Java method on the live process. Python values are coerced to JVM types based on the method’s declared signature.
raw_return field in the ActionResponse carries the JVM return value when an action maps to a method invocation. Inspect it to confirm what the method returned.
Enumerating loaded classes
Usesession.jvm.list_classes() to discover which classes are loaded in the target JVM. Filter by package prefix to narrow the results.
Type coercion reference
Cold probe timing
The first time NSP attaches to a JVM process, the initial probe can take 10 to 90 seconds. During this timeprobe_status reads "attaching" or "cold_probe". Wait for "active" before executing actions or reading fields.
Complete example: ArduPilot telemetry monitor
ardupilot_monitor.py
