1 ! Copyright (C) 2006 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
4 USING: kernel jni-internals namespaces ;
6 ! High level interface for JNI to be added here...
9 jni2 drop nip "env" set ;
12 "java/lang/System" "env" get find-class ;
14 : test2 ( system -- system.out )
15 dup "out" "Ljava/io/PrintStream;" "env" get get-static-field-id
16 "env" get get-static-object-field ;
18 : test3 ( int system.out -- )
19 "java/io/PrintStream" "env" get find-class ! jstr out class
20 "println" "(I)V" "env" get get-method-id ! jstr out id