summaryrefslogtreecommitdiffstatshomepage
path: root/tests/jni/object.py
blob: 8fbdb39d3929fa8484f081af33488f7daef4d345 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import jni

try:
    Integer = jni.cls("java/lang/Integer")
except:
    print("SKIP")
    raise SystemExit

# Create object
i = Integer(42)
print(i)
# Call object method
print(i.hashCode())
# Pass object to another method
System = jni.cls("java/lang/System")
System.out.println(i)