2015-10-23 23:19:48 +01:00
|
|
|
import jni
|
|
|
|
try:
|
|
|
|
Integer = jni.cls("java/lang/Integer")
|
|
|
|
except:
|
|
|
|
print("SKIP")
|
2017-06-10 18:14:16 +01:00
|
|
|
raise SystemExit
|
2015-10-23 23:19:48 +01:00
|
|
|
|
|
|
|
# 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)
|